Jump to content
php.lv forumi

table limit


IBEX

Recommended Posts

<?php
$result = mysql_query("SELECT * FROM video ORDER BY video_id DESC LIMIT 2");
$result = mysql_fetch_array($result);
echo '<BR><b>Newsest video - </b>'.$result['name'].'';

$result = mysql_query("SELECT * FROM `video` ORDER BY RAND() limit 2");
$result = mysql_fetch_array($result);
echo '<BR><b>Random Video - </b>'.$result['name'].'';
?>

Limits ir 2, bet rādās tikai 1.. :/ why? itkā viss ir pareizi..!?

Edited by IBEX
Link to comment
Share on other sites

×
×
  • Create New...