cvs: pear /MDB mysql.php
| From: | Lukas Smith | Date: | Thu, 20 Jun 2002 12:41:04 +0000 |
| Subject: | cvs: pear /MDB mysql.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-4711@lists.php.net to get a copy of this message | ||
lsmith Thu Jun 20 08:41:04 2002 EDT
Modified files:
/pear/MDB mysql.php
Log:
subSelect now returns NULL if the query did not result in any data being returned
Index: pear/MDB/mysql.php
diff -u pear/MDB/mysql.php:1.15 pear/MDB/mysql.php:1.16
--- pear/MDB/mysql.php:1.15 Thu Jun 20 07:57:26 2002
+++ pear/MDB/mysql.php Thu Jun 20 08:41:02 2002
@@ -2,7 +2,7 @@
/*
* mysql.php
*
- * @(#) $Header: /usr/repository/pear/MDB/mysql.php,v 1.15 2002/06/20 11:57:26 lsmith Exp $
+ * @(#) $Header: /usr/repository/pear/MDB/mysql.php,v 1.16 2002/06/20 12:41:02 lsmith Exp $
*
*/
@@ -227,6 +227,9 @@
$result = $this->queryCol($query, $col);
if (MDB::isError($result)) {
return $result;
+ }
+ if(!is_array($col) || count($col) == 0) {
+ return "NULL";
}
if($quote) {
for($i = 0, $j = count($col); $i < $j; ++$i) {