您好,欢迎访问一九零五行业门户网

表单查询不到值

如下代码 ='$s_date' ; }else{ $create_dates1=; }//申请结束日期作为查询条件 if($e_date!=''){ $create_dates2= and trunc(a.create_date)prepare($sel);$stmt->execute()||die(sel error);list($count_num)=$stmt->fetch();//空数据的提示if($count_numprepare($sel);$stmt->execute()||die(sel error);$i=0;while(list($sheet_no,$creator,$create_date,$flow_code,$form_key,$account_city,$contract_no,$par_value,$is_print)=$stmt->fetch()) { $selc=select current_user from subflow where form_key='$form_key'; $stc=$dbh->prepare($selc); if($stc->execute()) { list($current_user)=$stc->fetch(); } $creator_name=name($creator); $current_name=name($current_user); $dept_name=get_depart_name($dept_no); /* if($flow_code=='2') //==签核时抓取签核人员 { $sql_str=select a.current_user,name(a.current_user) from subflow a,flow b where a.form_key=b.form_key and b.form_key='$form_key' and a.current_user='$id' order by a.form_key,a.seq; //echo $sql_str; $stmt_str=$dbh->prepare($sql_str); $stmt_str->execute()||die(sql_str error); while(list($c_user,$c_user_name)=$stmt_str->fetch()) { $size=2; if($current_names=='') { $current_names=$c_user.$c_user_name; }else{ $current_names=$current_user.'-'.$current_name; } } }else */ if($current_user=='00000' and $flow_code=='z'){ $size=''; $current_names='结案'; }else{ $size=''; $current_names=$current_user.'-'.$current_name; } if($i==0 or $i%2==0){ $setcolor=line1; }else{ $setcolor=line9; } if($is_print==1){ $oper=已列印; }else{ $oper=无操作; } $account= get_account_city($account_city); $fpar_value= number_format($par_value,2,'.',','); if($listkind=='lm'){//退稿件 echo $sheet_no $account $contract_no $fpar_value $current_names $create_date 删除
; }else{ echo $sheet_no $account $contract_no $fpar_value $current_names $create_date $oper
; } $i=$i+1; }echo
;//分页数据query_list($count_num,$page_row,$position,$variable);?>
在页面上,点击查询之后查不到合约号,就是按合约号查询的时候查不到条件的合约号,如查询合约号等于1的部分,点击查询之后查到的却是所有数据,求大神帮忙!
回复讨论(解决方案) 看看你实际执行的 sql 指令
看看你实际执行的 sql 指令
版主,sql命令不是上边代码有写么。。。你说的是后台处理之后的sql语句么? 数据库中是否有记录?
先在db中直接执行sql看看。
然后再看代码生成的sql是否有错。
谢谢两位,结贴。
其它类似信息

推荐信息