Sauba danke... hatte wohl n brett vorm kopf... jedoch hab ich jetzt n neues Problem...
PHP-Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
$connectionid = mysql_connect ("localhost", "root", "");
if (!mysql_select_db ("adminzone", $connectionid))
{
die ("!!! [b]ERROR[/b] !!!Database ERROR!!! [b]ERROR[/b] !!!");
}
$start = (isset($start)) ? abs((int)$start) : 0;
$limit = 5;
$resultID = mysql_query("SELECT COUNT(id) FROM ".userdata);
$total = mysql_result($resultID,0);
$start = ($start >= $total) ? $total - $limit : $start;
$sql = "SELECT id,username,password FROM userdata LIMIT ".$start.",".$limit" ORDER BY id asc"
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
echo "<table width=425 cellspacing=4 cellpadding=0><tr>";
echo "<td width=25 bgcolor=#CCCCCC>[b]<div align=center>".$row[id]."</div>[/b]</td>";
echo "<td width=125 bgcolor=#E6E6E6><div align=center>".$row[username]."</div></td>";
echo "<td width=250 bgcolor=#CCCCCC><div align=center>".$row[password]."</div></td>";
echo "<td width=25 bgcolor=#E6E6E6><div align=center><input type='checkbox' name='chkbx_array[]' value='$row[id]'></div></td>";
echo "</tr></table>";
}
if ($start > 0)
{
$newStart = ($start - $limit < 0) ? 0 : ($start-$limit);
echo "[url=".$_SERVER['PHP_SELF']."]<< previous[/url]";
}
if ($start + $limit < $total)
{
$newStart = $start + $limit;
echo " [url=".$_SERVER['PHP_SELF']."]next >>[/url]";
}
?>
Das Problem ist jetzt das ich die Einträge Sortieren möchte ...
am besten mit "ORDER by ID asc"...
nur wie ihr seht ist in meiner Abfrage das bestimmt nicht richtig
PHP-Code:
<?php
$sql = "SELECT id,username,password FROM userdata LIMIT ".$start.",".$limit" ORDER BY id asc"
?>
Wisst ihr wie das richtig ist ???
mfg