 |
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 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
|
|
|

April 13th, 2005, 09:59 AM
|
Registered User
|
|
Join Date: Apr 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Chapter 15 Code Error - HELP!
Hey everyone,
I have downloaded the code for the message board in chapter 15, however, after I have created all the database tables, I receieve the following error from the main index page:
'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'
Anybody have any ideas?
Cheers!
|

April 15th, 2005, 06:01 PM
|
Registered User
|
|
Join Date: Apr 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I have exactly the same problem, someone please help us.....
|

April 25th, 2005, 04:42 PM
|
Registered User
|
|
Join Date: Apr 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Yer you guys me 2. Not a clue on it really.
|

October 18th, 2007, 08:52 PM
|
Registered User
|
|
Join Date: Feb 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Why is this still a problem with no solution. I am having same problem!
Chapter 15. sql that causes error
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
Error is listed here:
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.i' at line 2
On of you geniuses that took our money want to provide a fix???
|

January 24th, 2008, 05:13 PM
|
Registered User
|
|
Join Date: Jan 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I am having the same problem and can't find a solution already listed in this forum. Any help out there?
|

January 24th, 2008, 05:33 PM
|
Registered User
|
|
Join Date: Jan 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
OK.. I figured it out.
The problem is with the 'u.name as mod' portion of the SELECT statement in index.php. The word 'mod' is a reserved word in MySQL 5.0.
To fix this problem, change the 'u.name as mod' to 'u.name as moderator'.
You will then need to change the code later in the file which accesses this field.
Change
echo "<td class='center'>" . $row['mod'] . "</td>";
to
echo "<td class='center'>" . $row['moderator'] . "</td>";
It seems to work correctly after this....
|
Similar Threads
|
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
error while debugging in chapter 15 |
great.early805 |
BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 |
1 |
April 12th, 2008 02:27 AM |
code chapter 14 & 15 |
pierrethienpont |
BOOK: Professional VB 2005 ISBN: 0-7645-7536-8 |
1 |
February 24th, 2007 03:26 PM |
code source for the chapter 15 |
springDavid |
BOOK: Professional Java Development with the Spring Framework |
3 |
April 19th, 2006 03:02 PM |
Chapter 15 - Code doesn't run |
marcohp |
BOOK: Beginning XML 3rd Edition |
0 |
November 8th, 2005 03:41 PM |
|
 |