I am using PHP to do some command line work on a Linux box. I keep getting this error and can not figure out way. Is there something I am missing because this should work. There is a copy of the code at the bottom of this message.
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /usr/.autoserv/html/auto/updatequota.php on line 8 I am using the CLI version of php at the command line as you can see by the php -v output below PHP 4.3.3 (cli) (built: Sep 18 2003 14:15:53) Copyright (c) 1997-2003 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies with Zend Optimizer v2.1.0, Copyright (c) 1998-2003, by Zend Technologies I also no that I have mysql installed with this version here is a list of all compiled in Modules [PHP Modules] Zend Optimizer bcmath calendar ctype dba ftp gd gettext imap ldap mbstring mcrypt mhash mysql overload pcre posix readline session sockets standard tokenizer xml zip zlib [Zend Modules] Zend Optimizer #!/usr/.autoserv/php/bin/php <? include("location.inc"); Global $roothostname,$rootusername,$rootpassword,$dbName; dbconnect($dbName,$rootusername,$rootpassword,$roothostname); $query = "SELECT * FROM domhosted"; $result=safe_query($query); while($row = mysql_fetch_row($result)){ $dom=$row["domname"]; $total=getguota($dom); $result = safe_query("update datasubused set quotaused ='$total' where domname = '$dom'"); } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php