The Routine with the LIKE:
$sqlquery = "SELECT * FROM guestbook WHERE guest_message LIKE '%$query%'";
$row = mysql_query($sqlquery) or die(mysql_error());
$num_rows = mysql_num_rows($row) or die(mysql_error());
$num_pages = $num_rows / $numperpage;
$sqlquery .= " ORDER BY id DESC LIMIT 0,10";
$row = mysql_query($sqlquery) or die($sqlquery. " ". mysql_error());
WITHOUT LIKE:
$sqlquery = "SELECT * FROM guestbook";
$num_rows = mysql_num_rows(mysql_query($sqlquery));
$num_pages = $num_rows / $numperpage;
$row = mysql_query("SELECT * FROM guestbook ORDER BY id DESC LIMIT 0, 10);
Then I use:
while($gbvalues=mysql_fetch_array($row))
To print out the things. The LIKE case is used when there is a search, and the other if not. The without LIKE works. The one with it does not. Because it prints out 15.