Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6
This is the forum to discuss the Wrox book Beginning PHP, Apache, MySQLWeb Development by Michael K. Glass, Yann Le Scouarnec, Elizabeth Naramore, Gary Mailer, Jeremy Stolz, Jason Gerner; ISBN: 9780764557446
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 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
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 11th, 2007, 11:21 AM
Registered User
 
Join Date: Nov 2007
Location: , , Australia.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ch 16 Bulletin Board Code Problem

Hi everyone.

Just wondering if anyone had had a problem with the code from chapter 16 for index.php?

I've downloaded the code from the site and tried to run it and I get the following error:
Code:
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 f LEFT JOIN forum_posts p ON f.id = p.forum_id AND p.topic_' at line 1
The error comes from this code:
Code:
$sql = "SELECT f.id as id, f.forum_name as forum, f.forum_desc as description, count(forum_id) as threads, u.name as mod FROM forum_forum f LEFT JOIN forum_posts p ON f.id = p.forum_id AND p.topic_id=0 LEFT JOIN forum_users u ON f.forum_moderator = u.id GROUP BY f.id";
$result = mysql_query($sql) or die(mysql_error());
now this is as per the book, so I'm wondering if this is a config problem... anyone else experienced it or know what it is?

Thanks,
Ryan

Reply With Quote
  #2 (permalink)  
Old November 20th, 2007, 10:49 PM
Registered User
 
Join Date: Nov 2007
Location: , , Australia.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hey all.

still waiting for a response on this from the publishers, but anyone else solved this problem?

Reply With Quote
  #3 (permalink)  
Old March 10th, 2008, 03:52 PM
Registered User
 
Join Date: Jan 2008
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

http://p2p.wrox.com/topic.asp?TOPIC_ID=29227

mod is reserved - change to a different alias, be sure to check other references to 'mod'

Reply With Quote
Reply


Thread Tools
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
Bulletin Board system smith Wang BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 November 11th, 2007 08:12 PM
Adding Categories to Message board in Ch.16 PlaGuE BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 November 19th, 2005 08:24 PM
bulletin board in the book not correct yatishjain BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 February 12th, 2005 10:31 AM
creating a bulletin board system djfranknitti Beginning PHP 1 October 27th, 2004 09:00 AM
bulletin board allang Classic ASP Databases 2 May 24th, 2004 08:40 AM



All times are GMT -4. The time now is 08:11 AM.


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