|
@@ -294,6 +294,7 @@ class pQuerySql extends pQuery implements pQueryExtension {
|
|
|
* If a query is specified and debug mode is on, add the query to the error message.
|
|
* If a query is specified and debug mode is on, add the query to the error message.
|
|
|
*
|
|
*
|
|
|
* @param string $query The query that was executed, if any.
|
|
* @param string $query The query that was executed, if any.
|
|
|
|
|
+ * @codeCoverageIgnore
|
|
|
*/
|
|
*/
|
|
|
static function mysql_error($query='') {
|
|
static function mysql_error($query='') {
|
|
|
$error = sprintf('MySQL error %d: %s.', mysql_errno(), mysql_error());
|
|
$error = sprintf('MySQL error %d: %s.', mysql_errno(), mysql_error());
|
|
@@ -302,20 +303,6 @@ class pQuerySql extends pQuery implements pQueryExtension {
|
|
|
self::error($error);
|
|
self::error($error);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * Extention of {@link pQuery::error}, returning FALSE (useful in result loops).
|
|
|
|
|
- * Also, the current query is printed in debug mode.
|
|
|
|
|
- *
|
|
|
|
|
- * @param string $error The error message
|
|
|
|
|
- * @returns bool FALSE
|
|
|
|
|
- */
|
|
|
|
|
- static function error($error /* [ , $arg1 [ , ... ] ] */) {
|
|
|
|
|
- $args = func_get_args();
|
|
|
|
|
- call_user_func_array('pQuery::error', $args);
|
|
|
|
|
-
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* Escape a string for safe use in a query.
|
|
* Escape a string for safe use in a query.
|
|
|
*
|
|
*
|