Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
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


Thanks


Charlie

 
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
Default

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]





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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.