我有一个问题:
$offset_result = mysql_query( " SELECT FLOOR(RAND() * COUNT(*)) AS `offset` `".$slug."_movie`");
$offset_row = mysql_fetch_object( $offset_result );
$offset = $offset_row->offset;
$result = mysql_query( " SELECT * FROM `".$slug."_movie` LIMIT $offset, 10 " );
如何添加条件:STATUS = 1?
仅计算已发布的电影..
现在它全部:/
有人会举个例子吗?
答案 0 :(得分:0)
像这样:
$result = mysql_query( " SELECT * FROM `".$slug."_movie` WHERE STATUS=1 LIMIT $offset, 10 " );