Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 21st, 2008, 10:31 PM
Registered User
Join Date: Aug 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 16 Beginning php5, apache, mysql, web dev

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



Reply With Quote
  #2 (permalink)  
Old September 13th, 2008, 02:07 AM
Registered User
Join Date: Aug 2008
Location: Tehran, Tehran, Iran.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to toraj58

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]

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Beginning PHP, Apache, MySQL Web Development rich_m BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 January 7th, 2007 01:16 PM
Chapter 16 Generating Graphics (PHP5) CCIX PHP How-To 1 July 8th, 2005 07:23 AM
Chapter 16 Generating Graphics (PHP5) CCIX BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 June 29th, 2005 10:24 PM
Beg. PHP, Apache, MySQL Web Dev. rah Wrox Book Feedback 0 December 3rd, 2004 08:06 PM
Does "Beginning PHP, MySQL and Apache" Exist? pow1983 All Other Wrox Books 12 June 22nd, 2003 06:43 PM

All times are GMT -4. The time now is 07:22 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.