I am connecting to an SQL database in my PHP script and am having trouble with the LIMIT command:
$result = mysql_query("
    SELECT *
    FROM product
    WHERE `category` like \"" . $_GET['category'] . "\" 
    LIMIT 0, 16
");
This all works, except that if I only have 10 rows then $result contains rows 0~10 and then 0~6 as well.
I am using a a while loop while($row = mysql_fetch_assoc($result)) to check if there is a result and then run an action. Is there any way of having it limit the select statement to only show rows 0~10?
 
     
    