I've got two data tables like below.
Table 1:
--------------------
sbstart sbend totsb
--------------------
200 205 6
Table 2:
chkNo
------
201
203
I have got a dropdown box created dynamically which contains table 1 information which is all the responses from 200 to 205. In other words that dropdown has 200,201,202...205. What I now need is to exclude the numbers in table 2 once the dropdown box is created. For instance then the dropdown should have only 200,2004 and 2005 when it is displayed.
Here is the code I've done to get all the responses between start and end number as per table 1. Can someone please tell me how do I exclude the table 2 numbers once the dropdown is created. Thanks.
$con=mysql_connect('localhost','root') or die ("Server connection failure!");
$db=mysql_select_db('regional_data',$con) or die ("Couldn't connect the database");
$SQLx="SELECT * FROM table1";
$runx=mysql_query($SQLx,$con) or die ("SQL Error");
$norx=mysql_num_rows($runx);
while ($rec = mysql_fetch_array($runx))
{
for($i=$rec['sbstart']; $i<=$rec['sbend']; $i++)
{
echo "<option id='options' value='$i'>$i<br></option>";
}
}