Mr_Cat - 5:14 pm on Feb 11, 2012 (gmt 0)
I think this is a php thing...
If I just want to fetch one single specific bit from a single row in my db, how is the best way?
If field 2 in row with ID 7 is the number 8
$query = "SELECT field2";
$query.= " FROM table1";
$query.= " WHERE row_ID = 7";
$result = mysql_query($query);
$almost_desired_bit = mysql_fetch_array($result);
$desired_bit = $almost_desired_bit['field2'];
seems a bit long winded somehow just to fetch the number 8, there must be a far simper way.
Would I be closer with mysql_fetch_object or something?