phpbar.de logo

Mailinglisten-Archive

AW: [php] db durchsuchen

AW: [php] db durchsuchen

Thomas Gigold php_(at)_phpcenter.de
Wed, 4 Jul 2001 18:28:12 +0200


> 1. Eingabeformular
> 
> 2. dann
> 
> if ($searchterm!=""){
> $sqlsearchterm=" and about like '%$searchterm%'"; 
> }else{
> $sqlsearchterm="";
> }
> if ($url!=""){
> $sqlurl=" and url like '%$url%'";
> }else{
> $sqlurl="";
> }
> 
> 
> 3. DB-Abfrage
> 
> $db->query( "select * from wasimmerauch where 1 ".$sqlsearchterm .
> $sqlurl ." order by url asc limit 15");while ($db->next_record()) {
>  
> ........
> 
> }


danke!!!


php::bar PHP Wiki   -   Listenarchive