自从我包含 LIMIT 以来,我遇到了 SELECT SQL 的问题,所以我的代码如下所示:
$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);
直到我没有添加限制它才能正常工作但在脚本说之后:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/radiolev/public_html/forum.php on line 194
Partnerzy
有人可以帮我解决这个问题吗?