Wrox Programmer Forums
|
BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0
This is the forum to discuss the Wrox book Beginning PHP5, Apache, and MySQL Web Development by Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Michael K. Glass; ISBN: 9780764579660
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 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 June 12th, 2008, 04:18 AM
Registered User
 
Join Date: Jun 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 16 Viewforum issue

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 = 2' at line 1
SELECT forum_name as name, forum_desc as description, forum_moderator as mod FROM forum_forum WHERE id = 2

I previously had searched how to fix a similar error for index.php but was fixed by replace mod with jod but there's no fix for this anywhere yet.

Nevermind I just fixed my own issue by searching all the files.

I had to go to functions.php and edit

function getForum($id) {
  $sql = "SELECT forum_name as name, forum_desc as description, " .
         "forum_moderator as mod ".
         "FROM forum_forum ".
         "WHERE id = " . $id;
  $result = mysql_query($sql)
    or die(mysql_error() . "<br>" . $sql);
  $row = mysql_fetch_array($result);
  return $row;
}

to

function getForum($id) {
  $sql = "SELECT forum_name as name, forum_desc as description, " .
         "forum_moderator as jod ".
         "FROM forum_forum ".
         "WHERE id = " . $id;
  $result = mysql_query($sql)
    or die(mysql_error() . "<br>" . $sql);
  $row = mysql_fetch_array($result);
  return $row;
}






Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 16 Fig 16-11 krsouthern BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 1 July 8th, 2008 12:11 PM
Chapter 16 yspider BOOK Beginning CSS: Cascading Style Sheets for Web Design, 2nd Ed; ISBN: 978-0-470-09697-0 1 June 19th, 2008 10:27 AM
chapter 16 ?? farsfar2 BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 11 March 26th, 2005 10:01 PM
Chapter 16 ioda006 JSP Basics 3 August 21st, 2004 07:28 PM
Help in Chapter 16 aldwincusi VB.NET 2002/2003 Basics 2 June 4th, 2003 09:52 AM





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