Skip to content

Instantly share code, notes, and snippets.

@nayibor
nayibor / rawQuery_puzzle
Created July 10, 2015 00:49
rawQuery_puzzle
* @param string $sql SQL statement
* @param array $params Additional options for the query.
* @return mixed Resource or object representing the result set, or false on failure
*/
public function rawQuery($sql, $params = array()) {
$this->took = $this->numRows = false;
return $this->execute($sql, $params);
}
@nayibor
nayibor / error_cake
Created July 3, 2015 01:55
error with response code
both queries below are in the context of a transaction done
$dataSourceProduct->begin($this->Product);
which sends a start transaction to the database in the mysql logs
START TRANSACTION
---first query
can see query in mysql logs being sent to server