I am trying to get my server to connect.. But I'm having some trouble.
So, I have this code:
$id = (int)$_GET["id"];
$temp = mysql_query("SELECT * FROM ForumThread WHERE ID = $id");
if (mysql_num_rows($temp) > 0) {
$ThreadInfo = mysql_fetch_assoc($temp);
}
if ($ThreadInfo) {
if (isset($_GET["p"])-1) {
$page = $_GET["p"];
} else {
$page = 1;
}
$offset =( 8 * intval($page));
if(!$offset){
$offset = 0;
}
$posttemp = mysql_query("SELECT * FROM ForumPost WHERE ThreadID = $id ORDER BY ID ASC LIMIT $offset, 9");
$numpost = mysql_query("SELECT COUNT(*) FROM ForumPost WHERE ThreadID = $id");
$numpostfin = mysql_result($numpost, 0);
$numpage = ceil($numpostfin / 8);
$ThreadPost = mysql_fetch_assoc($posttemp);
}
But when I try this out on my site, it's skipping the first row. Just the first.
So I have this test in my database, and it won't where I have:
(I am not allowed to post pictures, because I don't have a reputation of 10)
My database - Don't mind the danish
And its skipping the first that it reads?
Please excuse my English :)