phpbar.de logo

Mailinglisten-Archive

[php] besser suchen ?

[php] besser suchen ?

Axel Tietje a.tietje_(at)_flynet.de
Thu, 25 Mar 1999 10:28:00 +0100


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
--------------------------------------------------



php::bar PHP Wiki   -   Listenarchive