Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6
Password Reminder
Register
| FAQ | Members List | 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 Search this Thread Display Modes
  #1 (permalink)  
Old March 22nd, 2006, 02:21 PM
Registered User
 
Join Date: Mar 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Mysql error in checkout2.php in E-Commerce example

I get the following error when running the E-Commerce example from code downloaded from Wrox site:

Warning: Wrong parameter count for mysql_query() in c:\Apache Group\Apache2\htdocs\checkout2.php on line 244

Line 244 is the "or die " line in the following command sequence:
$query = "SELECT * FROM carttemp WHERE" .
         "carttemp_sess = ". $sessid;
$results = mysql_query($query)
    or die(mysql_query());


Reply With Quote
  #2 (permalink)  
Old May 29th, 2006, 09:44 PM
Registered User
 
Join Date: May 2006
Location: Salem, OR, USA.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It looks to me like the $query is wrong:

$query = "SELECT * FROM carttemp WHERE" .
         "carttemp_sess = ". $sessid;

needs to be:

$query = "SELECT * FROM carttemp WHERE carttemp_sess='$sessid'";

Hope that helps


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Recordset error in Dreamweaver Using PHP and MySQL toosuave Dreamweaver (all versions) 1 August 25th, 2006 07:27 AM
Chapter14, checkout2.php-Msql error JECovill BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 May 30th, 2006 05:10 PM
begin php & mysql - chapter 12, user_form.php jon_stubber Beginning PHP 1 March 9th, 2006 10:57 AM
MySQL & PHP Parse error Stuart BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 March 17th, 2005 03:44 PM
error handling in asp.net e-commerce programming 123 All Other Wrox Books 0 October 19th, 2003 04:55 AM



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


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