I need to limit the first six results from a query with a condition WHERE.
I would like to do something like that:
mysql_query("CREATE VIEW [test] AS SELECT * FROM table WHERE status=1");
$sel = "SELECT * FROM [test] LIMIT 0,6";
$result = mysql_query($sel);
while($r=mysql_fetch_array($result)){
echo "".$r['id']."<br>";
}
How can I do it? Thanks!
You need to limit your ordered conditional selection. (You probably don't have to order this)