From 4bc22c716706b8b7c6501385de3f34d8b835465a Mon Sep 17 00:00:00 2001 From: Nathan Gass Date: Thu, 31 Mar 2022 16:08:07 +0200 Subject: move sql to body of error messages --- it_dbi.class | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/it_dbi.class b/it_dbi.class index 240f6af..ae77486 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -578,7 +578,7 @@ function query($query, $p = array()) { if ($result === null || !$p['safety']) return false; - $this->_fatal("query(\"$query\") failed"); + $this->_fatal("query() failed", $query); } else if (it::match('^(CREATE|ALTER|DROP) ', $query, array('utf8' => false))) { @@ -687,7 +687,7 @@ function select(...$args) } if (!$this->iterate() && ($this->_p['safety'] >= 2)) - $this->_fatal("select(): query produced no results: \"$sql\""); + $this->_fatal("select(): query produced no results", $sql); } $this->_nofetch = !$nofetch; -- cgit v1.2.3