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 6, Apache, MySQL 6 Web Development ISBN: 9780470391143
This is the forum to discuss the Wrox book Beginning PHP 6, Apache, MySQL 6 Web Development by Timothy Boronczyk, Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz; ISBN: 9780470391143
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 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 August 10th, 2009, 03:13 PM
Registered User
Points: 11, Level: 1
Points: 11, Level: 1 Points: 11, Level: 1 Points: 11, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 4 movie_details.php

I have entered the code for the above file but whenever I try to run it I get the following message

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 " at line 6

I have tried downloading the code from the website but I get the same message when I try and run the downloaded file.

Can anyone help?
Reply With Quote
  #2 (permalink)  
Old September 15th, 2009, 10:50 PM
Registered User
 
Join Date: Aug 2009
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Identifying and pickOut the problems

Firstly you need to identify what is on your line 6?

Tips:
To be more efficient in solving the problem u need to Identify the exact Line with the error.

1st - Qoute the browser's Error Message
2nd - Qoute the Lines of codes involve in the Error Message (altho. sometimes you need to qoute the whole Chunk of codes)
3rd - If you are following the BOOK closely, please also state the Page No.

4th - Wait for reply from some helpful/resourceful reader.
5th - Dont forget to thank them if they solve your problems

If you dont qoute/pickout the problems what you Posted will be Jibberish and can't be help by others.

GoodLuck

Just my 2cents
-Slim, WebProgrammerWannabe
Reply With Quote
  #3 (permalink)  
Old January 2nd, 2010, 04:16 PM
Authorized User
 
Join Date: Jan 2010
Posts: 19
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Hi bobg,

Please re-read page 124.

Step 2 states to save the file as movie_details.php and upload it to the web server... It does not state to open movie_details.php in a web browser.

Step 3 states to open table3.php in a web browser which will then call the movie_details.php file when a link is clicked.

I ran into the same problem because I did not read step 3...
Reply With Quote
  #4 (permalink)  
Old March 17th, 2011, 05:58 PM
bcb bcb is offline
Registered User
 
Join Date: Mar 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Solved: movie_details.php syntax error line 6

I ran into the same error as Bobg. I found the error went away when I edited the table3.php around line 99. I did not notice that on page 118 the heredoc is changed from ENDHTML to ENDINFO (not sure if that matters, but it was not highlighted as a change in the book.

I also had tried to use the Tooltips code on page 119, but when using this I received the
"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 " at line 6" When I used the original code without the tooltip, everything worked. Hope this helps someone down the road.

$table .= <<<ENDINFO
<tr>
<td> <a href="movie_details.php?movie_id=$movie_id"> $movie_name </a> </td>

<td>$movie_year</td>
<td>$director</td>
<td>$leadactor</td>
<td>$movietype</td>
</tr>
ENDINFO;
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
movie_details.php issues gargamel BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 12 October 24th, 2010 06:02 AM
Chapter 4 movie_details.php help ilovesloth BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 April 12th, 2009 04:32 PM
begin php & mysql - chapter 12, user_form.php jon_stubber Beginning PHP 1 March 9th, 2006 09:57 AM
Chapter 4 P124 - movie_details Pheeal Beginning PHP 0 January 27th, 2006 09:16 AM
need help with movie_details.php code kjames1973 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 3 December 26th, 2004 03:28 PM



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


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