So I am trying to add a drop down list which will call the data of a particular field of table in db, and show it, then when I click on the list, some data will be shown accordingly.
Now the problem is, I did good in first two lists, then when I testing my third list, it will show "Unknown column 'alumn.work.field' in 'where clause'".
Below is my code to call the variable from my table in database:
// Start : Job list
mysql_select_db($database_cnJw, $cnJw);
$query_rs_job = "SELECT field FROM alumn_work";
$rs_job = mysql_query($query_rs_job, $cnJw) or die(mysql_error());
$row_rs_job = mysql_fetch_assoc($rs_job);
$totalRows_rs_job = mysql_num_rows($rs_job);
// End : Job list
and here is the code to add the drop down list:
<select name="alumn_work_field">
<option value="" selected="selected"></option>
<?php
do {
?>
<option value="<?php echo $row_rs_job['field']?>">;
<?php echo $row_rs_job['field']?></option>
<?php
}
while ($row_rs_job = mysql_fetch_assoc($rs_job));
$rows = mysql_num_rows($rs_job);
if($rows > 0) {
mysql_data_seek($rs_job, 0);
$row_rs_job = mysql_fetch_assoc($rs_job);
}
?>;
</select>
I myself think the problem will be occur here:
<select name="alumn_work_field">;
but I not sure what is the problem. Can anyone tel me what is the problem?