Auch wenn ich "Alle" anklicke, gibt er keinen einzigen user aus, obwohl 4 Stück in der DB exisiteren.....
PHP-Code:
<?php
require_once("includes/header.php");
if (!$s) {
$s = "0";
} //Seite festlegen
if(!$q){ $q = "Alle"; }
$code = array("Alle", "#", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z");
foreach ($code as $a)
{
$q = str_replace("raute", "#", $q);
if($q != $a){
$link = str_replace("#", "raute", $a);
?><a href="members.php?s=<?php echo $s; ?>&q=<?php echo $link; ?>">[ <?php echo $a; ?> ]</a>
<?php
}
else
{
?>
<b>[ <?php echo $q; ?> ] </b>
<?php
}
} //LINKS AUSGEGEBEN
?>
<table border="0" cellpadding="0" cellspacing="2" width="100%">
<tr>
<td class="titel" width="33%"> <b>Username</b></td>
<td class="titel" width="33%"> <b>Mitglied seit dem</b></td>
<td class="titel" width="34%"> <b>Homepage</b></td>
</tr>
<?php
if($q == "Alle"){
$where = "%";
}
else
{
if($q == "raute"){
$where = "^[^a-zA-Z]";
$where2 = "REGEXP ";
}
else
{
$where = $q."%";
}
} //DAS WHERE ZUSAMMEN GESTELLT
$i = 1;
$start = 20 * $s;
$query = "SELECT * FROM `cv_users` WHERE UPPER('USER')=".$where2."'".$where."' ORDER BY USER ASC LIMIT " . $start . ",20";
$sql = mysql_query($query); //DIESE QUERY FUEHRT ER NCIHT AUS!!!!, BZW. ER FINDET KEINE DATENSAETZE!!!!
while ($user = mysql_fetch_array($sql)) {
if ($i == "1") {
$bg = "#116BAE";
} else {
$bg = "#116BFF";
}
?>
<tr>
<td> <?php echo $user["USER"];
?></td>
<td> <?php echo strftime("%d.%m.%Y um %H:%M Uhr", $user["RTIME"]);
?></td>
<td> <?php if ($user["URL"] != "") {
?><a href="<?php echo $user["URL"];
?>" target="_blank"><?php echo $user["URL"];
?></a><?php }
?></td>
</tr>
<?php
if ($i == "1") {
$i = "2";
} else {
$i = "1";
}
}
?>
</table>
<p align="center"><?php
$numbers = mysql_num_rows(mysql_query("SELECT * FROM `cv_users`"));
if ($numbers > 0) {
?>Seite: <?php
for($i = 0;$i < ceil($numbers / 20);$i++) {
if ($s == $i) {
?>
<b>[</b><?php echo $i + 1;
?><b>]</b>
<?php
} else {
?>
<a href="members.php?s=<?php echo $i;
?>">[<?php echo $i + 1;
?>]</a>
<?php
}
}
}
?></p>
<?php
require_once("includes/footer.php");
?>
Kommentar