On Sunday 31 March 2002 07:29, Alberto Wagner wrote:
> $Sql_Query_Login Returns an empty mysql array like:
>
> $Sql_Query_Login = Mysql_Query("SELECT Nome FROM users WHERE User =
> 'Anyone'")
>
> There isn't a user if name Anyone...
>
> Why
>
> If (!$Sql_Query_Login) {
>    Echo "Ninguem";
> }
>
> Is returning False?

mysql_query() returns a resource id, which is a *pointer* to the results and 
not the actual results themselves.

To get at the actual results you need to follow up with one of:

mysql_fetch_array()
mysql_fetch_row()
mysql_fetch_assoc()

See manual for details and examples.

Also you should put some error-checking in your code as per the examples in 
the manual.


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
Bennett's Laws of Horticulture:
        (1) Houses are for people to live in.
        (2) Gardens are for plants to live in.
        (3) There is no such thing as a houseplant.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to