User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 402,669 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,260 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource

Join Date: Mar 2007
Posts: 1
Reputation: civuk is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
civuk civuk is offline Offline
Newbie Poster

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource

  #7  
Mar 9th, 2007
I am having the same problem
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\Program Files\Abyss Web Server\htdocs\getrecord.inc on line 6
how ever this is my code


<?php
// version 1.1
$qstr = "SELECT * from members where id = '1' ";
$result = mysql_query($qstr);

if (mysql_num_rows($result)) // check login info is correct
{
$username = mysql_result($result,0, "username");
$password = mysql_result($result,0, "password");
echo "<b>The username:</b> $username<br>";
echo "<b>The password:</b> $password<br>";
}
else echo "ERROR - unable to find current username and password!";
mysql_close();
?>

please someone help me
Reply With Quote  
All times are GMT -4. The time now is 4:13 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC