Home > Backend Development > PHP Tutorial > A serach database program written with mysql_odbc and php_PHP tutorial

A serach database program written with mysql_odbc and php_PHP tutorial

WBOY
Release: 2016-07-21 16:02:47
Original
809 people have browsed it

  

  
  
查询条件  
  
  

  

查询条件

  

  
  
  
  
  
  
  
用户名称: 用户地址: 用户电话:
  

  
  
  
  

//后台PHP  
echo "";  
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");  

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/316441.htmlTechArticlehtml 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查询...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template