Is there a way to get all the values of one field into an array in mysql? I have a unique number in a field called 'time'. I want to grab all times to make sure that a new time is not already entered. Any suggestions??
Thanks.
$sql = mysql_query("SELECT time FROM table"); $results=array(); $i=0; while($r=mysql_fetch_array($sql)) { $results[$i] = $r['time']; $i++; }
thanks!