Getting single value from a single row with Mysql/PHP

Posted by Ghostrider on Stack Overflow See other posts from Stack Overflow or by Ghostrider
Published on 2010-06-02T23:59:21Z Indexed on 2010/06/03 0:04 UTC
Read the original article Hit count: 144

Filed under:
|

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?

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql