![]() |
| ||
| MySQL syntax error 1064 why i am i getting this synyax error when trying to display data from the database the code for saving the data is // save content to db and the code to get the data from the data base is $SQL = "SELECT cms_core FROM '$sContent' WHERE id=1";thanks if anyone can help |
| ||
| Re: MySQL syntax error 1064 Hi Kevin What else does the error message say? Normally something along the lines of "near..." |
| ||
| Re: MySQL syntax error 1064 here is the full error message MySQL Error: 1064 // You have an error in your SQL syntax near '' at line 1 |
| ||
| Re: MySQL syntax error 1064 OK. A little hazy still ... We don't know which is line 1. Print out your queries with echo $SQLand see if that helps. |
| ||
| Re: MySQL syntax error 1064 Syntax error while updating the record or while fetching ? Quote:
Quote:
|
| ||
| Re: MySQL syntax error 1064 Maybe my reply was a little hazy too! Sorry! ;-) By printing out the queries, you will be able to see what the mySQL server is being sent and hopefully that will steer you in the right direction! |
| ||
| Re: MySQL syntax error 1064 i am no getting a different problem with error codes. cmsservdb is the database cms_core is the table name and editorial is the coloum name. my database sewtup looks like this <?php and the error message i am getting now on the page that is recalling the data is MySQL Error: 1146 // Table 'cmsservdb.editroial' doesn't exist the code used to access this data is $SQL = "SELECT * FROM editorial WHERE id= 1 "; |
| ||
| Re: MySQL syntax error 1064 i have just edited the code used to recall the data so it looks like this and the error has gone it now tells me there is nothing in the record set. the code looks like this $SQL = "SELECT editorial FROM cms_core WHERE id= 1 "; |
| ||
| Re: MySQL syntax error 1064 $res will have the resource_id of the query you just executed. You can check if there are any records or not this way. $res = mysql_query($SQL,$db); |
| ||
| Re: MySQL syntax error 1064 i echoed the $sql on both the pages and on the page where the data is being recall it gave the Nothing in recordset.CREATE TABLE cms_core ( editroial longblob id int ) and when i echoed the $sql on the page where it is saving it gave me UPDATE cms_core SET editorial=' then all the text that is being saved to the database with WHERE id=$id after the text. it looks like the data is being saved to the database but why can i not recall the data on the other page. |
| All times are GMT -4. The time now is 3:15 am. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC