Getting single value from a single row with Mysql/PHP
- by Ghostrider
Often I just need to get a single value from MySQL that I know exists there. I use the following construct:
$result = end(mysql_fetch_array(mysql_query('SELECT FOUND_ROWS()', $db)));
Is there a proper single function in PHP that would do this?