Re: Problem with using php at the command line with mysql
| From: | Sven | Date: | Mon, 05 Jan 2004 12:09:51 +0000 |
| Subject: | Re: Problem with using php at the command line with mysql | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-173744@lists.php.net to get a copy of this message | ||
hi richard,
Richard Kurth schrieb:
<? include("location.inc"); Global $roothostname,$rootusername,$rootpassword,$dbName; dbconnect($dbName,$rootusername,$rootpassword,$roothostname); $query = "SELECT * FROM domhosted"; $result=safe_query($query);i don't know what safe_query() does for you. if it's your own function from your .inc-file some code could be helpful. otherwise try this: $result=mysql_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'"); } ?>hth SVEN