打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
一个用mysql_odbc和php写的serach数据库程序
userphoto

2008.03.06

关注
<html>  

<head>  
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">  
<title>查询条件</title>  
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">  
</head>  

<body bgcolor="#fcf8c2">  

<p>查询条件 </p>  

<form action="searchyh.php" method="post">  
<table border="1" width="43%" height="34">  
<tr>  
<td width="100%" height="28">用户名称: <input type="text" name="name" size="20"></td>  
<td width="100%" height="28">用户地址: <input type="text" name="add" size="20"></td>  
<td width="100%" height="28">用户电话: <input type="text" name="tel" size="20"></td>  
</tr>  
</table>  
<p><input type="submit" value="提交查询"> </p>  
</form>  
</body>  
</html>  

//后台PHP  
<?php  
echo "<body bgcolor=’#fcf8c2’>";  
echo "查询结果:";  
echo "
";  
echo "
";  
$conn = odbc_connect("blue", "root", "");  
$name .="%";  
$add .="%";  
$tel .="%";  
$query = "select * ";  
$query .= "from jc_yh where (name like ’$name’ and address like’$add’ and tel like ’$tel’ )";  
odbc_result_all( odbc_do($conn, $query), "border=1 width=50%");  
odbc_close($conn);  
?>  

///表结构  
CREATE TABLE jc_yh (  
id int not null default 0,  
name varchar(80) not null default "blue",  
city varchar(40) not null default "xn",  
tel varchar(14) not null default "00000000000000",  
fax varchar(14) not null default "00000000000000",  
address varchar(60) not null default "xn",  
post varchar(6) not null default "000000");
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
Mysql触发器在PHP项目中用来做信息备份、恢复和清空
PHP采集淘宝商品
AutoCRUD的使用手册
asterisk realtime sip数据库实时添加sip peers
MyBatis学习4
php用户注册(前台完美js验证)源代码
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服