how do i count how many rows in a table contain a certain string? what i have so far is:
$result=mysql_query('SELECT username FROM users WHERE username=$username'); //($username = $_POST['username'])
then i use mysql_num_rows($result) to see how many it returns, but php says:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home2/haztuweb/haztuweb-www/gus/devvo/register_after.php on line 22
i know that i am connected, i have selected the database properly, users is a table and username is a column...


Reply With Quote

Bookmarks