Jump to content

MySQL Limit


spertuit

Recommended Posts

Can anyone see why my results would return more than 20 rows? 

$query = "SELECT * FROM mailer ";
$limit = "ORDER BY id LIMIT 20 ";
$result = mysql_query($query.$limit);
if (!$result) {
    $message  = 'Invalid query: ' . mysql_error() . "\n";
    $message .= 'Whole query: ' . $query;
    die($message);
}
$address = 0;
while ($row = mysql_fetch_assoc($result)) {
$id=$row["id"];
$email=$row["email"];
$companyID=$row["companyID"];
}
Link to comment
https://forums.phpfreaks.com/topic/280249-mysql-limit/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.