/** * @static * @access public * @return resource|boolean */ static function sqlQuery($query, $params = null, $link_identifier = null) { switch (gettype($params)) { case 'array': $sql = self::formatQuery($query, $params); break; case 'NULL': $sql = $query; break; default: $sql = self::formatQuery($query, array($params)); break; } $result = is_null($link_identifier) ? mysql_query($sql) : mysql_query($sql, $link_identifier); if (!$result) { throw MormSqlException::getByErrno(mysql_errno(), mysql_error()); } return $result; }
public function __construct($message = 'Erreur de validation') { parent::__construct($message); }
public function __construct($field) { parent::__construct('No associated object found for key ' . $field); }
public function __construct($table, $field) { parent::__contruct("The field {$table}.{$field} doesn't exist in the database."); }
public function __construct($message = 'This entry already exists') { parent::__construct($message); }
public function __construct($table) { parent::__construct("Can't delete from {$table} after an order,limit or offset clause has been set"); }
public function __construct($message = 'impossible to guess the table from an alias') { parent::__construct($message); }
public function __construct($message = 'No primary Key', $table) { parent::__construct($message); }