Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.1.2

Request #7580 getOne
Submitted: 2006-05-08 18:06 UTC
From: deelight at f-m dot fm Assigned: quipo
Status: Closed Package: DB_QueryTool (version 1.0.3)
PHP Version: 5.1.2 OS: Windows XP
Roadmaps: (Not assigned)    
Subscription  


 [2006-05-08 18:06 UTC] deelight at f-m dot fm (Andrzej Kowalik)
Description: ------------ Unless I missed something, I don't think it's currently possible to do this. It would be very usefull to have something like DB's getOne to get the first column of the first row from a query result. Test script: --------------- $dbCategory->reset(); $dbCategory->setSelect('MAX(position)'); $res = $dbCategory->getOne(); // $res would contain the highest position

Comments

 [2006-05-08 18:15 UTC] deelight at f-m dot fm
forgot to mention, that right now, to achieve the result, I use DB's getOne combined with DB_QueryTool's getQueryString: $dbCategory->reset(); $dbCategory->setSelect('MAX(position)'); $res = $db->getOne($dbCategory->getQueryString());
 [2006-05-08 20:44 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!