If you like SEOmastering Forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...

 

$dbh->getOne($query, $params = array())

Started by beingchinmay, 08-11-2016, 08:22:02

Previous topic - Next topic

beingchinmayTopic starter

The getOne() method returns the first column from the first row of data. Use the $params parameter if $query contains placeholders (this applies to the rest of the convenience functions, too). Here's an exampl

Quote$name = $dbh->getOne('SELECT name FROM users WHERE id = ?',
array($_GET['userid']));



If you like SEOmastering Forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...