Seo Forum

Coding & Programming => PHP Forum => Topic started by: beingchinmay on 08-11-2016, 08:22:02

Title: $dbh->getOne($query, $params = array())
Post by: beingchinmay on 08-11-2016, 08:22:02
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']));