|
Subject:
|
Chapter 16 Beginning php5, apache, mysql, web dev
|
|
Posted By:
|
charlie2450
|
Post Date:
|
8/21/2008 10:31:11 PM
|
Please can someone help me with this. I am just completing chapter16 in Beginnng php5, apache, mysql and web development. After I log in, I select new forums and the following error keeps coming up
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 'mod FROM forum_forum WHERE id = 1' at line 1 SELECT forum_name as name, forum_desc as description, forum_moderator as mod FROM forum_forum WHERE id = 1
Thanks
Charlie
|
|
Reply By:
|
toraj58
|
Reply Date:
|
9/13/2008 2:07:15 AM
|
your problem is a little tricky. you've got this error because mod is acctually reserved mySQL keyword. you should change it to something else like moderator. please notice also mode is a reserved keyword so you should be carefull.
if you encountered such problem again i offer you first test your query with mySQL query browser. for example if you test your faulty query (you've posted here) you see that the color of mod is blue, so you can identify that it is a reserved keyword.
Touraj Ebrahimi [toraj_e] [at] [yahoo] [dot] [com]
|
|