The page loads its content from a single variable that could contain a number from 1-5 or more. So the array (built from an sql table) has 2 columns, the first column contains a number to match the variable number, The second number contains the important information.
If the variable is 1, it will load all the information from the table where the first column is a 1. everything works fine. However when the variable is a 2, and it loads the information where the first column is a 2, I get a warning on mysql_data_seek.
I understand that it means that the data from the array of 2 has no entry that is in the first row of the table.
Is there anyway around this?
Posibly where I can have data seek jump to the first item in the array rather than the first in the table?
Code: Select all
<?php
while ( $row = mysql_fetch_array($filelist) ) {
$test_value = $row['ID'];
echo "<input name='selectedfile[]' type='checkbox' value='" . $test_value . "'";
while ( $row2 = mysql_fetch_array($FiletoPagelist) ) {
if ( $row2['file'] == $test_value ) {
echo " checked";
}
echo ">";
}
mysql_data_seek ($FiletoPagelist,0);
}
?>