1 - this is not the right list :)
but ...
mysql_close() needs an argument. this argument is the result of
mysql_connect().

mysql_fetch_array() needs the result of funcstions like mysql_query(),
mysql_db_query() etc.
these functions execute something and return the "result", handle it to a
variable and pass it as argument to mysql_fetch_array().

$sql = mysql_connect( host, user, pass );
mysql_select_db( database );
$result = mysql_query("select * from users" );
while ( $row = mysql_fetch_array($result) )
{
 ...
}

bye,

---
 Fabio Moraes
 [EMAIL PROTECTED]
 +55 21 3088 9548 



> -----Original Message-----
> From: Peter Goggin [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 27, 2002 11:10 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-INST] Setting up a web server wit Redhat 7.3
> 
> 
> I dont know if this is the right list.
> I have set up redhat 7.3, apache, mysql and php.
> I can connect to my mysql users from the command line. I am 
> now trying to
> get the connections via web pages to work properly. .
> There is however  error which I do not undertand.
> 
> Warning: No MySQL-Link resource supplied in
> /usr/local/www/vantweststamps/databaselogin.php on line 15
> Connected successfully
> ,Line 15 is
> mysql_close();
> 
> 
> If I then go on to use a page which requires the database 
> connection I get:
> Warning: Supplied argument is not a valid MySQL result resource in
> /usr/local/www/vantweststamps/stampconditionlist.php on line 39
> Line 39 is:
> if ($row= mysql_fetch_array($result))
> 
> These pages all work without error on my win98 machine with 
> apache, mysql
> and php.
> 
> Is there any documentation which lists all of these error 
> conditions and
> suggests ways of solving them?
> 
> Regards
> 
> Peter Goggin
> 
> 
> 
> 
> 
> 
> 
> -- 
> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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

Reply via email to