for ($i=0; $i <= $brute_queries_max; $i++) { HTH
-Joni- "Florin Andrei" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I'm using: > - apache-1.3.22 > - mysql-3.23.49a > - php-4.0.6 > - Linux Red Hat 7.2 > > I have a piece of code that does this: > > for ($i=0; $i < $brute_queries_max; $i++) { > $q = $brute_queries[$i]; > $q = "SELECT COUNT(*) " . $q; > $res = mysql_query($q) > or die("in $host database, cannot run query $q"); > $line = mysql_fetch_row($res); > $n = $line[0]; > $hits_per_table[$i] = $n; > } > > Basically, it goes through a list of tables in the same database and > performs a "SELECT COUNT(*) FROM $table WHERE column LIKE '%string%'" > > On a few databases with smallish tables, it's fine. > But i hav a database which has a couple of large tables (> 8 mil. rows). > The loop goes through the tables, i can see it in mysql with "SHOW > PROCESSLIST", then it reaches the large tables. And then it starts all > over again, from the first table, and so on. If i let it run, it goes > like this for hours, until i click on the Stop button in the browser. > > I'm totally puzzled. It should timeout, or send an error or something. > But to start the for() loop all over???? > > Weird thing is, if i perform the query manually (from the mysql client) > it works fine, although slow - it takes like 120 sec to run the query on > the big table. > > I cranked up all timeout parameters in PHP and MySQL, but that didn't > improved anything. > > Is this a known problem? Seems like a bug to me. > > -- > Florin Andrei > > "In my view, a man's value does not depend on what he learns, > or his position or fame, or what he does, but on what he is > and inwardly becomes." - Sri Aurobindo, a note to his biographers > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php