& Lt; html & gt; & nbsp; & lt; head & gt; & nbsp; & lt; metahttp-equivContent-Typecontenttext/html; charsetgb2312 & gt; & nbsp; & lt; title & gt; query condition & lt;/title & gt; & nbsp
Query conditions
Query conditions
// Background php (as the mainstream development language)
Echo"";
Echo "query result :";
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 );
?>
/// Table structure
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 ");