vendredi 26 décembre 2014

mysql random select Latest 15 in 100 rows data


$sql = "SELECT `url`,`title`,`vid` FROM `video` ORDER BY `time` DESC limit 15";
$stmt = $pdo->prepare($sql);
$stmt->execute();
$row = $stmt->fetchAll(PDO::FETCH_ASSOC);


This SQL can select the top new 15 rows data.


I want display the top new 100, but just show 15


How to select faster?





Aucun commentaire:

Enregistrer un commentaire