组合框填充文本框中的aginst数据 [英] combo box fill aginst data in textbox
本文介绍了组合框填充文本框中的aginst数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我选择了组合框列表填充文本框后,我在组合框列表中填充数据。
例如在组合框中我选择城市然后填写位置我该怎么办?我怎么能在where子句中查询第二个查询?
组合框代码
i have fill data in combo box list, after i select combo box list fill text box.
for example in combo box i select city then fill location how can i do ? how can i wirte second query in where clause ?
combo box code
<select name="cmbJob" id="SearchItem1" class="cmbJob" onChange=" document.getElementById('txtjob').value=this.value; document.getElementById('JOB_NO').value=this.options[this.selectedIndex].text; document.getElementById('idValue').value=this.options[this.selectedIndex].value;">
<option value="0" selected="selected">---Select JobNo---</option>
<?php
include('dbconnection.php');
$sql=mysql_query("select distinct JOB_NO from mm_client_loc_job");
while($row=mysql_fetch_array($sql))
{
$id=$row['JOB_NO'];
$data=$row['JOB_NO'];
//echo '<option value=>'.$data.'</option>';
echo '<option value="'.$id.'">'.$data.'</option>';
}
?>
</select>
推荐答案
sql = mysql_query( 选择 distinct JOB_NO 来自 mm_client_loc_job);
< /跨度> while(
sql=mysql_query("select distinct JOB_NO from mm_client_loc_job"); while(
row = mysql_fetch_array (
row=mysql_fetch_array(
sql))
< span class =code-summarycomment> {
sql)) {
这篇关于组合框填充文本框中的aginst数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文