public function query($q){
if(empty($q)) $this->dbError('Empty MySQL Query.');
if($this->linkID == 0) $this->connect();
$temp = @mysql_query($q, $this->linkID);
var_dump($temp);
echo $q.'<br />';
echo mysql_error();
if(!$temp) $this->dbError('Invalid Query : '.mysql_error().'<br />'.$q);
return $temp;
}
resource(13) of type (mysql result) SELECT * FROM jw_users WHERE userName = ‘rhys’ AND userPassword = ‘…’
bool(true) UPDATE jw_users SET userLoginTimestamp = ‘1316512160’ WHERE userID = ‘3’
bool(false) SELECT * FROM jw_ticket WHERE ticketID = ‘1’
Array ( [Error] => Invalid Query :
SELECT * FROM jw_ticket WHERE ticketID = ‘1’ )
1
I have no idea why but both mysql_error and errno are NULL.
resource(13) of type (mysql result) bool(true)
resource(15) of type (mysql result) bool(false)
That boolean false is triggering the error. So one query is ok, the second isn’t. Just to be sure, could you do an echo of $q right after the var_dump? I know the query is displayed by the dbError method, but still.
OK I’ve been chasing these queries for too long. Everytime I remove one to see if it is the problem, the new problem becomes and earlier query. Any ideas as to why it would error on an earlier and earlier query until you have none left?
resource(13) of type (mysql result) SELECT * FROM jw_users WHERE userName = ‘rhys’ AND pass = ‘…’ bool(false)