heyas, im currently trying to code some php which will dump only the first 100 results on the first page and then will list the rest on others. My code is as follows:
<?
if(empty($start))
$start = 0;
$db = mysql_connect('localhost','user','pass');
mysql_select_db("db", $db);
$select = "SELECT count(name) as total from divx";
$res = mysql_db_query("DB", $select);
$count = mysql_fetch_object($res);
$pages = ceil($count->total / 100);
for($i = 1; $i < $pages+1; $i++)
{
if($i != 1)
{
echo " | ";
}
echo "<a href=\"$PHP_SELF?$QUERY_STRING&start=" . $i 100 . "\">$i</a>";
}
$sql = "SELECT FROM divx".(isset($sort) ? " ORDER BY $sort;" : " ORDER BY name;" limit $start, 100);
im getting parse errors, can someone please look over my code to see if soemthing is wrong or perhaps suggest a better way to do it?. Cheers.....
-Stewart