My mysql database is effecting the area in which it is displayed on my page. If you go to http://www.johnboymorris.com/refer/test.php
you will notice that it looks like I added a bunch of
however their is none.
When ever I edit
$sqlquery = "SELECT FROM refer ORDER BY time DESC LIMIT 0,35";
it changes toe position.
For instance if i change the above select code to
$sqlquery = "SELECT * FROM refer ORDER BY time DESC LIMIT 0,5";
it displays the data near the top of the page, without any scrolling down (to see the top of the table) required. Attached is the PHP code for the site....
<?php
/ declare some relevant variables /
$DBhost = "localhost";
$DBuser = "user";
$DBpass = "pass";
$DBName = "db";
$table = "table";
mysql_connect($DBhost,$DBuser,$DBpass) or die("Unable toconnect to database");
@mysql_select_db("$DBName") or die("Unable to select database $DBName");
$sqlquery = "SELECT * FROM refer ORDER BY time DESC LIMIT 0,35";
$result = mysql_query($sqlquery) or die(mysql_error().$sqlquery);
$number = mysql_num_rows($result);
if ($number < 1) {
print "No Refferals";
}
else {
while ($number > $i) {
$time = mysql_result($result,$i,"time");
$host = mysql_result($result,$i,"host");
$page = mysql_result($result,$i,"page");
$refer = mysql_result($result,$i,"refer");
$refp = split("/",$refer);
$refshort = $refp[0] . "//" . $refp[2] . "/";
print "<tr align=center><td>www.johnboymorris.com$page<br><b>Date:</b>$m, $date, $year, $t:$time2</td><td><a href='http://www.$refer'>http://www.$refp[0]</a><BR><b>Host</b>: $host</a></td></tr><br>";
$i++;
}
}
?>
Anyone have any suggestion.