| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2156 人关注过本帖
标题:[求助]ASP列表框与文本框判断查询
只看楼主 加入收藏
guyer
Rank: 2
等 级:新手上路
威 望:5
帖 子:451
专家分:0
注 册:2007-1-19
收藏
得分:0 

你写代码了么 打出来看看


http://www./
2007-04-29 17:44
guyer
Rank: 2
等 级:新手上路
威 望:5
帖 子:451
专家分:0
注 册:2007-1-19
收藏
得分:0 
以下是引用yuxin1382在2007-4-29 17:43:13的发言:
西安:

sql="select * from 表 where 1=1" 这里的1=1是什么意思啊

条件永远为真...某某人发明的


http://www./
2007-04-29 17:44
lq7350684
Rank: 6Rank: 6
等 级:贵宾
威 望:20
帖 子:5089
专家分:98
注 册:2006-11-6
收藏
得分:0 
那个1=1是随便找的,为了满足共有的条件的
也可以写成2=2
呵呵
2007-04-29 17:45
lq7350684
Rank: 6Rank: 6
等 级:贵宾
威 望:20
帖 子:5089
专家分:98
注 册:2006-11-6
收藏
得分:0 
哈哈
12正解.
2007-04-29 17:46
yuxin1382
Rank: 1
等 级:新手上路
帖 子:172
专家分:0
注 册:2006-12-8
收藏
得分:0 

guyer

你好啊,你是要我什么的代码啊?

2007-04-29 20:35
yuxin1382
Rank: 1
等 级:新手上路
帖 子:172
专家分:0
注 册:2006-12-8
收藏
得分:0 

guyer
你好
我现在的代码是这样的:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--#include file="conn.asp"-->
<% kc="select * from kcsp"
set rs=conn.execute(kc)
%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>商品数据</title>
<style type="text/css">
<!--
.style1 {font-size: medium}
.style2 {
font-size: medium;
font-weight: bold;
}
-->
</style>

</head>
<body>
<div align="center">

<form name="form1" method="post" action="" onchick="retrun ss() ">
<table width="588" border="0" bgcolor="#CCCCCC">
<tr>
<th width="77" height="20" scope="col">快速查找:</th>
<th width="103" scope="col"><select name="select" style="width:90px; height:15px; font-size:15px; background-color:#CCCCCC">
<option value="0">商品编号</option>
<option value="1">商品名称</option>
<option value="2">入库日期</option>
</select></th>
<th width="58" scope="col">条件:</th>
<th width="105" scope="col"><select name="select" style="width:90px; height:15px; font-size:15px; background-color:#CCCCCC">
</select></th>
<th width="143" scope="col"><input name="sqltext" type="text" size="20"></th>
<th width="76" scope="col"><input type="submit" name="Submit" value="查询"></th>
</tr>
</table>
</form>
<p>&nbsp;</p>
<table width="610" border="1" bordercolor="#9966CC">
<tr>
<th bgcolor="#990033" scope="col">&nbsp;</th>
</tr>
</table>
<table width="610" height="30" border="1" cellpadding="1" bordercolor="#9999CC">
<style>
table {width:160;table-layout: fixed;}
td {white-space: nowrap;}
</style>

<tr>
<th width="50" scope="col"><div align="center">编号</div></th>
<th width="130" scope="col"><div align="center">名称</div></th>
<th width="60" scope="col"><div align="center">型号</div></th>
<th width="40" scope="col">价格</th>
<th width="40" scope="col">数量</th>
<th width="40" scope="col">单位</th>
<th width="60" scope="col">类别</th>
<th width="90" scope="col">入库时间</th>
</tr>
<% do while not rs.eof %>


<tr>
<th width="50" nowrap scope="col"><div align="left" class="style1"><%=rs("kcsp_id")%></div></th>
<th width="130" nowrap scope="col"><div align="left" class="style1"><%=rs("kcsp_name")%></div></th>
<th width="60" nowrap scope="col"><div align="left" class="style1"><%=rs("kcsp_xh")%></div></th>
<th width="40" nowrap scope="col"><div align="left" class="style1"><%=rs("kcsp_jg")%></div></th>
<th width="40" nowrap scope="col"><div align="left" class="style1"><%=rs("kcsp_sl")%></div></th>
<th width="40" nowrap scope="col"><div align="left" class="style1"><%=rs("kcsp_jldw")%></div></th>
<th width="60" nowrap scope="col"><div align="left" class="style1"><%=rs("kcsp_lb")%></div></th>
<th width="90" nowrap scope="col"><div align="left" class="style1"><%=rs("kcsp_lksj")%></div></th>
</tr><% rs.movenext
loop
%>
</table>
</div>
</body>
</html>
<% rs.close

set rs=nothing
conn.close

2007-04-29 21:15
yuxin1382
Rank: 1
等 级:新手上路
帖 子:172
专家分:0
注 册:2006-12-8
收藏
得分:0 

不是吧,怎么发上去是这样子显示啊,你们一定看了吓到了吧

2007-04-29 21:16
yuxin1382
Rank: 1
等 级:新手上路
帖 子:172
专家分:0
注 册:2006-12-8
收藏
得分:0 
有没有人给个解决的方法啊。
2007-04-30 09:24
lq7350684
Rank: 6Rank: 6
等 级:贵宾
威 望:20
帖 子:5089
专家分:98
注 册:2006-11-6
收藏
得分:0 
你测试我们给的代码了没有?
出现什么错误?
2007-04-30 09:30
yuxin1382
Rank: 1
等 级:新手上路
帖 子:172
专家分:0
注 册:2006-12-8
收藏
得分:0 

你们给得,我都看不来啊。能具体给个例子吗。谢谢,最好有个说明啊

2007-04-30 11:18
快速回复:[求助]ASP列表框与文本框判断查询
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011926 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved