Re: [pear-webmaster] PEAR DB getCol
| From: | Lukas Kahwe Smith | Date: | Wed, 23 May 2007 16:04:28 +0000 |
| Subject: | Re: [pear-webmaster] PEAR DB getCol | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-27360@lists.php.net to get a copy of this message | ||
John Mambo wrote:
I was just wondering what is the use of the second parameter (mixed $col = 0 ) in DB getCol. If we are only getting one column why should provide two columns in the select statement and then add a parameter to get that column? For example $data =& $db->getCol('SELECT cf, df FROM foo', 1); can simply be accomplished by $data =& $db->getCol('SELECT df FROM foo');wrong list .. anyways i am replying with pear-general (the proper list) in CC .. anyways .. yes you are right .. however there are things like the show commands, where you do not control the select list. regards, Lukas