phpbar.de logo

Mailinglisten-Archive

Re: [php] besser suchen ?
Archiv Mailingliste php_(at)_infosoc.uni-koeln.de

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [php] besser suchen ?



Hi,

mein Vorschlag (nicht getestet):

--snip--

$suche .= $suche2 ;

switch ($suche) {
    case 0: $q = "Titel like '%$name%' or $wo like '%$name%'"; break;
    case 1: $q = "Titel like '%$name%'"; break;
    case 2: $q = "Kata like '%$name%'"; break;
    case 3: $q = "Titel like '%$name%' or Kata like '%$name%'"; break;
}

$query  = "SELECT * FROM $userstable WHERE " . $q . " order by Titel
LIMIT $offset,$maxrows"
$query1 = "SELECT * FROM $userstable WHERE " . $q . " order by Titel"

--snap--

Gruß, Axel.

a.tietje_(at)_flynet.de
--------------------------------------------------
 Source code equals power. Source code is sacred.
 Trust nobody...

          From: Software Developers Combat Manual
--------------------------------------------------


Home | Main Index | Thread Index

php::bar PHP Wiki   -   Listenarchive