What I am trying to do is pull all the records in a table that have a value of 0 in the Seen column. Now in the database there is multiple times you see 0 in the see column. The way it is pulling it, it is giving the last instance when it sees it. I want the first record that shows the instance of 0 in Seen
Thanks
Code:
$sql = "SELECT * FROM " .$table_name. " WHERE Seen = 0";
$results = @mysql_query($sql) or die(mysql_error());
while ($row = mysql_fetch_array($results))
{
$subID = $row['subscriber_id'];
$fname = $row['realtor_fname'];
$lname = $row['realtor_lname'];
$phone1 = $row['realtor_phone1a'];
$phone2 = $row['realtor_phone1b'];
$phone3 = $row['realtor_phone1c'];
$timedate = $row['time_created'];
$sugar = $row['sugarcrm_imported'];
}
Thanks