Wrox Programmer Forums
|
BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5
This is the forum to discuss the Wrox book Beginning PHP4 by Wankyu Choi, Allan Kent, Chris Lea, Ganesh Prasad, Chris Ullman; ISBN: 9780764543647
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 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 February 16th, 2004, 10:28 AM
Authorized User
 
Join Date: Dec 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default CHPT16 mall.php page579

ehh i see so i have many problem with grafics.
problem with mall.php
when i open index.html everything is ok.
but when i fill the form on left side and submit it,in right frame i see:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in c:\program files\apache group\apache\htdocs\mall.php on line 10

What is wrong?Here i can't solve this problem myself :/

 
Old February 16th, 2004, 03:02 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It means that the result resource returned by mysql_query() is FALSE, indicating an error with your query.

Use mysql_error() to get the error returned by MySQL.
  http://www.php.net/mysql_error


You should perform validity checking after each step involving a connection to another server/service, such as a database. At it's simplest, this is:

mysql_connect(...) or die("Couldn't connect: " . mysql_error());

mysql_select_db(...) or die("Couldn't select DB: " . mysql_error());

mysql_query(...) or die("Query failed: " . mysql_error());


Take care,

Nik
http://www.bigaction.org/
 
Old February 16th, 2004, 03:43 PM
Authorized User
 
Join Date: Dec 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thank you for your fast reply.
Now i havn't any problem.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Beg. PHP 5 > Ch. 11 - fetch_field.php crater BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 January 2nd, 2007 12:20 PM
begin php & mysql - chapter 12, user_form.php jon_stubber Beginning PHP 1 March 9th, 2006 10:57 AM
Error: movie.php & commit.php on p182-186, ch6 willburke BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 October 12th, 2004 02:48 PM
Problem with graf. CHPT16 page 575(Polish ver). RABARBAR BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 2 February 16th, 2004 09:00 AM
ch16 gd based interactive mall keng BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 September 20th, 2003 06:10 AM





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