|
Posted by "Richard Lynch" on 10/25/05 05:32
On Mon, October 24, 2005 12:25 pm, Mário Gamito wrote:
> ---
> $query = "SELECT COUNT (login) FROM WHERE login = '$login'";
> $result = mysql_query($query);
> mysql_fetch_row($result);
> ---
>
> It gives me
> Warning: mysql_fetch_row(): supplied argument is not a valid MySQL
> result resource in /var/www/html/registar_action.php on line 22
First, I'm going to give you a fish:
.... FROM WHERE ...
Which MySQL database TABLE is it that you think you are looking in?
You have to tell it which table to look in.
Now I'm gonna teach you to catch fish:
Change your middle line to:
$result = mysql_query($query) or die("<br />$query<br />" .
mysql_error());
That will get PHP and MySQL to TELL YOU what's wrong, instead of just
saying "Something's wrong"
--
Like Music?
http://l-i-e.com/artists.htm
Navigation:
[Reply to this message]
|