I have a database and i want to sort results like this:
$query1 = "SELECT * FROM pictures LIMIT 0,10 ";
$result = mysql_query($query1);
while($row = mysql_fetch_array($result))
echo $row['picture_rating'];
and
$query1 = "SELECT * FROM pictures WHERE column_name = 'column_text' ";
$result = mysql_query($query1);
while($row = mysql_fetch_array($result))
echo $row['picture_rating'];
Both of the codes above are working properly, but when i want to use both condition at one time like this:
$query1 = "SELECT * FROM pictures LIMIT 0,10 WHERE column_name = 'column_text' ";
it doesnt work. Any ideas how to make it work? Thanx!
SOLVED: Information that LIMIT should be after WHERE was exactly what i needed. Thanx to all.