Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old November 21st, 2003, 02:31 AM
DorkRawk DorkRawk is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 173 DorkRawk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via AIM to DorkRawk
supplied argument not valid

I get this warning when I call a function from one page, but not from another. Any ideas what could cause this to happen on one page but not the other?

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/midwests/www/www/forum/funcs.small.php on line 562

Reply With Quote
  #2  
Old November 21st, 2003, 03:05 AM
nazly nazly is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Colombo,SriLanka
Posts: 1,325 nazly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 18 sec
Reputation Power: 3
Send a message via Yahoo to nazly
RE: supplied argument not valid

As the error states you are not passing a valid result identifier to the mysql_num_rows() function. This could probably happen if you have an error in your SQL statement.

eg:
php Code:
Original - php Code
  1.  
  2. $query="SELECT......";//An SQL statement
  3. $result=mysql_query($query);
  4. //$result will have the result identifer on success
  5. echo mysql_num_rows($result);


To figure out the try using die() to print out the mysql error
php Code:
Original - php Code
  1.  
  2. $query="SELECT......";//An SQL statement
  3. $result=mysql_query($query) or die(mysql_error());
  4. echo mysql_num_rows($result);

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > supplied argument not valid


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT