MySQL Error: 1064 - HELP!

Discussion in 'Databases' started by Scotty13, Feb 16, 2012.

  1. #1
    I’m working with php scripts, phpMyAdmin in Dreamweaver CS4. Im build a social network website. I have a table called MDB_trvldiary. I’m getting this error on my page title: edit_trvldiary_entry.php You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'D_ID=' at line 1 SQL Query: [ select entry fromMDB_trvldiarywhere D_ID= ] In File: /home/myglobal/public_html/root/myvcorganizer/edit_trvldiary_entry.php Line Number: 25 Line 25: $query = do_query("select entry from".$config['tableTRVLDiary']."where D_ID=".$_GET['id'],__LINE__,__FILE__) Table: $result = mysql_query ("CREATE TABLE MDB_trvldiary ( D_ID int(11) NOT NULL auto_increment, date datetime NOT NULL default '0000-00-00 00:00:00', entry text NOT NULL, PRIMARY KEY (D_ID)) TYPE=MyISAM AUTO_INCREMENT=11 ;") or die(mysql_error());if (mysql_query($result)){print "Success in TABLE creation!......

    That completes the table setup, now delete the file
    named 'trvldiary.php' and you are ready to move on. Let us go!
    ";} else {print "no TABLE created. You have problems in the system already, backtrack and debug!";}exit();?>Can anyone help me please? Thanks in advance, Scott
     
    Scotty13, Feb 16, 2012 IP
  2. StormInternet

    StormInternet Peon

    Messages:
    46
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi,

    Looking at the query on line 1 :
    can you confirm there is a space between words "from" , "MDB_trvldiary" and "where" ?
    If they do not have a space in between them then its syntactically wrong
     
    StormInternet, Feb 23, 2012 IP