Mailinglisten-Archive |
Hi....
hier nun die auflösung wie ich die indexierung gemacht habe....
erst datenbank auslesen.....
*schnipp*
$query = "SELECT * FROM $userstable WHERE Titel like '%$name%' or Kata like
'%$name%' order by Titel LIMIT $offset,$maxrows";
$result = MYSQL_QUERY($query);
$number = MYSQL_NUMROWS($result);
$total = $number1;
*schnapp*
danach herausfinden wieoft was vorhanden ist.....
*schnipp*
print "<BR><center>[ ";
if ($total == 0 )
print "fehler ";
}
elseif ($total > 0){
$zaehlblock = 25 ;
$offset = 0 - $zaehlblock;
$maxrows = $zaehlblock;
$bloecke = $total / $zaehlblock;
$bloecke = $bloecke + 1;
$count =1;
while ( $count < $bloecke){
$offset = $offset + $zaehlblock;
print "<font face=\"Verdana\" size=\"-1\"><a
href=\"/cgi-bin/php/ausgabe-kochbuch-test.phtml?wo=$wo&suche=$suche&name=$na
me&offset=$offset&maxrows=$maxrows\">$count</a></font> ";
$count++;
}
}
print "]</center><BR>";
*schnapp*
so mag nicht der beste code sein aber es funktioniert einwandfrei......
zu sehen auf www.chefkoch.de bei der rezeptsuche
Beste Grüße aus Sinzig,
Alexander Meis
pixelhouse media service
----------------------------------------------------------------
- Barbarossastraße 36 - 53489 Sinzig
- Tel: 02642-980330 - Fax: 02642-980215
- Internet: http://www.pixelhouse.de
-----------------------------------------------------------------
php::bar PHP Wiki - Listenarchive