summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorFrank M. Kromann <fmk@php.net>2001-08-10 20:34:05 +0000
committerFrank M. Kromann <fmk@php.net>2001-08-10 20:34:05 +0000
commit300ac8c2383012e1a5dc830fe3ea90bb0a74f3bd (patch)
treeb42ba395410e4efd61c994ddd7388a0ff864efad /ext
parent5019d3d4b9fc3c425fe98dbecd5cee74c71819d7 (diff)
downloadphp-git-300ac8c2383012e1a5dc830fe3ea90bb0a74f3bd.tar.gz
Adding SQL statement to the warning
Diffstat (limited to 'ext')
-rw-r--r--ext/fbsql/php_fbsql.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/fbsql/php_fbsql.c b/ext/fbsql/php_fbsql.c
index f9c559b310..e54ec1469a 100644
--- a/ext/fbsql/php_fbsql.c
+++ b/ext/fbsql/php_fbsql.c
@@ -1449,7 +1449,7 @@ PHP_FUNCTION(fbsql_db_status)
/* {{{ mdOk
*/
-int mdOk(PHPFBLink* link, FBCMetaData* md)
+int mdOk(PHPFBLink* link, FBCMetaData* md, char* sql)
{
FBCDatabaseConnection* c = link->connection;
int result = 1;
@@ -1475,7 +1475,7 @@ int mdOk(PHPFBLink* link, FBCMetaData* md)
if (FB_SQL_G(generateWarnings))
{
if (emg)
- php_error(E_WARNING, emg);
+ php_error(E_WARNING, "Error in statement: '%s' %s", sql, emg);
else
php_error(E_WARNING,"No message");
}
@@ -1499,7 +1499,7 @@ static void phpfbQuery(INTERNAL_FUNCTION_PARAMETERS, char* sql, PHPFBLink* link)
meta = fbcdcExecuteDirectSQL(link->connection, sql);
- if (!mdOk(link, meta))
+ if (!mdOk(link, meta, sql))
{
fbcmdRelease(meta);
ZVAL_BOOL(return_value, 0)