New mysql/php question?

Permabanned
Joined
19 Apr 2006
Posts
2,333
Location
West Yorkshire
my forray into php and mysql continues, however I was making a page to list stuff from a mysql db an ran in to this error:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /mounted-storage/home41a/sub004/sc31310-WDJT/www/testsites/tourney/listplayers2.php on line 12

this is line 12

Code:
$rows = mysql_num_rows($result);

Anyone help a n00b?
 
Never mind I found an error in the table I was selecting from, so the $result was empty lol :(

However I have a new question, when using:


Code:
SELECT * FROM $table WHERE user_maingrp = 15 ORDER BY user_name ASC

how could I make it so it checks if user_maingrp = 15,17 or 20?


Thanks again in advance :)
 
Back
Top Bottom