Hello,
I have a loop on an sqlite query which checks $domain until the status of
$domain changes and then it deletes $domain.
However when all the $domain items have been deleted I need the script to
stop.. regardless of how many querys the loop
still has to run. So I want to detect when its empty and then stop.
I have this... which does not work.
<?
$db = sqlite_open("whois.sqlite");
$x = 0;
while ($x < 9000) {
$result = sqlite_query($db, "SELECT * FROM whois ORDER BY id");
// if (!$result) {
if (empty($result)) {
echo "No data";
} else {
while ($row = sqlite_fetch_array($result)) {
$domain = $row['name'];
echo "$domain";
$x++;
usleep(400000);
}
}
}
sqlite_close($db);
?>
Thanks
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php