include "config.php";
$query = "select * from $backlinktable ORDER by id DESC LIMIT 0, 1";
$result=mysql_query($query);
$row = mysql_fetch_array($result);
$id=$row["id"];
$query2 = "select * from $backlinktable ORDER by id ASC LIMIT 0, 1";
$result2=mysql_query($query2);
$row2 = mysql_fetch_array($result2);
$firstid=$row2["id"];
?>