Fix some screwy logic in AwlQuery for statements with no parameters.

This commit is contained in:
Andrew McMillan 2010-03-18 22:46:01 +13:00
parent c4917a7e6e
commit 4e9c3dedc5

View File

@ -502,7 +502,7 @@ class AwlQuery
}
else $this->error_info = null;
}
else if ( $this->sth !== false ) {
else if ( !isset($this->sth) ) {
/** Ensure we have a connection to the database */
if ( !isset($this->connection) ) {
_awl_connect_configured_database();
@ -515,6 +515,9 @@ class AwlQuery
}
else $this->error_info = null;
}
else if ( $this->sth === false ) {
$success = false;
}
if ( $success ) $this->rows = $this->sth->rowCount();
$t2 = microtime(true); // get end time
$i_took = $t2 - $t1;