It looks like you're new here. If you want to get involved, click one of these buttons!
Python
Forum LeaderThe Royal RAM
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home2/pythonsb/public_html/forum/index.php on line 19
The Royal Ram
Comments
Photoshop Tutorials- Coming soon
Premium PHP Scripts- Coming soon
Haha i should really do some work so i can remove all the coming soon's
$regnum = "SELECT * FROM `$dbprefix.users`";
$regnum2 = mysql_query($regnum);
$regnum3 = mysql_num_rows($regnum2);
$regtotal = $regnum3;
Photoshop Tutorials- Coming soon
Premium PHP Scripts- Coming soon
Haha i should really do some work so i can remove all the coming soon's
What i dont understand is that taht exact piece of code i had working in a different file... perhaps ill try changing some of the db stuff...it shouldnt make a difference tho
The Royal Ram
Photoshop Tutorials- Coming soon
Premium PHP Scripts- Coming soon
Haha i should really do some work so i can remove all the coming soon's
The Royal Ram
[php]$regnum2 = mysql_query($regnum) or die(mysql_error());[/php]
Also, you should always check the validity of a mysql result before using it for anything. In this case, the 'or die' will stop the script on a query error, but often times you don't want such intrusive error messages popping up. So it's best to test the result (mysql_query will return false on error) before using it in other functions like mysql_num_rows.
Webmaster-Talk.com
Chroder.com
Photoshop Tutorials- Coming soon
Premium PHP Scripts- Coming soon
Haha i should really do some work so i can remove all the coming soon's