PHP/MySQL - Best way to return a single value

Discussion in 'Web Design and Development' started by seventeen, Jun 28, 2009.

  1. seventeen macrumors member

    Joined:
    Apr 9, 2009
    Location:
    Denton, Tx
    #1
    What is the best way to return a single value from a mysql query with php? Rather than use mysql_fetch_array or assoc...

    Basically is there a mysql function i can use to return the value into a single variable?

    ex:
    PHP:
    $single_value mysql_...($resource);
     
  2. Volante macrumors regular

    Joined:
    Feb 8, 2008
  3. seventeen thread starter macrumors member

    Joined:
    Apr 9, 2009
    Location:
    Denton, Tx
    #3
    wow, thanks so much. I had no idea that existed. hah.
     

Share This Page