Hello!
I need to loop through a list of numbers and check if they are present in a column in a database or not.
I'm having a hard time figuring out how to check the column value by value and compare to a incrementing $i value.
here is my query...
$query2 = mysql_query("SELECT * FROM video");
$column = mysql_fetch_array($query2);
echo $column2['cable_number'];
this only echoes me the first ['cable_number'] in the database. i need to get every single one, and perform actions on each one as they come through.
and here is my for() statement
for($i=100;$i<=$highest;$i++){
check if $i is in the database.
if it is(do something)
if it isn't(do something)
}
i need to use that $i each iteration and see if it's present in the 'cable_number' column in the database. then i do something and continue on with the next i$ value.