Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in select
I've got problem with SELECT SQL since ive included LIMIT, so my code looks like this:
$id = $_GET['id'];
$sql = "UPDATE rl_threads SET views = views + 1 WHERE id = '$id'";
$sql = mysql_query($sql);
//Pager
$ile = 10;
if(isset($_GET['page']))
{
$strona = $_GET['page'];
}
else
{
$strona = 1;
}
$strona = $strona - 1;
$offset = $strona * $ile;
//Koniec Pagera
$sql = "SELECT * FROM rl_posts LIMIT $od, 10 WHERE thread_id = '$id'";
$sql = mysql_query($sql);
until i havent add limit it worked properly but after the script says:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/radiolev/public_html/forum.php on line 194
Partnerzy
Can someone help me fixing this issue?