Hi,
Can anyone tell me where I'm going wrong, this code is suppose to get and print the first ten records only but it doesn't stop at ten but gets all the records that match.
<?php
// ---- db connect -----//
$result = mysql_query("SELECT * FROM table1 WHERE field = 'Y' ORDER BY date1 LIMIT 0,10",$db);
if ($myrow = mysql_fetch_array($result)) {
do {
//--- record print stuff -----------//
} while ($myrow = mysql_fetch_array($result));
}
?>
Thanks