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

January 5th, 2005, 10:03 PM
|
|
Authorized User
|
|
Join Date: Dec 2004
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
congrats!!! i'm glad to hear it.
|
|

January 29th, 2005, 05:18 PM
|
|
Registered User
|
|
Join Date: Jan 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
quote:Originally posted by jaygee
I'm trying to run charlist.php on page 263 and get the following
error message displayed.
You have an error in your SQL syntax near 'ON c.id = pk.char_id AND p.id = pk.power_id' at line 2
The line from the code, reproduced below, is the same as the book and
the downloaded code.
$sql = "SELECT c.id, p.power FROM char_main c JOIN char_power p JOIN
char_power_link pk ON c.id = pk.char_id AND p.id = pk.power_id";
I've even tried running the query from the mysql monitor and get the same result. I used phpMyAdmin to create the database and the tables since I couldn't get the make_table.php to run either!
I'm running under Linux Version 2.4.18-5, PHP Version 4.1.2,
MySQL version 3.23.49 and Apache version 1.3.23.
Thanks in advance for any help.
|
Does anyone know the code for the old version to get this to work?
|
|

August 11th, 2005, 10:45 AM
|
|
Registered User
|
|
Join Date: Aug 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I've had the same problem too. One way round it is to replace the JOIN..ON with FROM...WHERE
e.g.
SELECT c.id, p.power FROM char_main c, char_power p, char_power_link pk WHERE c.id = pk.char_id AND p.id = pk.power_id
...which appears to produce the desired results...
However, I am waiting for my guru to come back to me to let me know the correct JOIN syntax.
...In the meantime, if anyone knows the correct syntax then please let me know (I am using MySQL 3.23.59)
|
|
 |