PEAR::DB getCol default behaviour

From: Date: Mon, 26 Sep 2005 07:44:18 +0000
Subject: PEAR::DB getCol default behaviour
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-21102@lists.php.net to get a copy of this message
Hi, Consider this code: $sql = 'SELECT email FROM vw_event_persons WHERE event_id=!'; $emails = $db->getCol($sql, null, array(23)); I'm trying to skip the 2nd parameter, passing in NULL to leave it at its default value, which is 0. This however raises an error, saying :"field not found". When I pass in 0 like this: $emails = $db->getCol($sql, 0, array(23)); it works fine. I was under the impression that when you pass in NULL, the default parameter value (0) would get passed instead. Is this a bug? Jeroen

« previous php.pear.general (#21102) next »