RE: [PHP] PHP / Query trouble

From: Date: Fri, 24 Mar 2006 02:49:56 +0000
Subject: RE: [PHP] PHP / Query trouble
Groups: php.general 
Request: Send a blank email to php-general+get-232508@lists.php.net to get a copy of this message
[snip] #--> If submitted if($_GET['method']=="optimize") { #--> Set to array $allTables = mysql_query("SHOW TABLES"); if(!$query){ print mysql_error(); } while($table = mysql_fetch_assoc($allTables)) #for($i = 0; $tableName = mysql_fetch_array($allTables);) { #--> Walk that array foreach($table as $dbName => $tableName) { #--> Optimize query $optimizeTableQuery = mysql_query("OPTIMIZE TABLE '".$tableName."'"); if(!$optimizeTableQuery){ print mysql_error(); } } } } anyone? [/snip] What, precisely, is the problem? Have you echo'd your query to see what it looks like?

« previous php.general (#232508) next »