|
Posted by lnsoso on 05/22/07 08:44
On 5月22日, 下午3时42分, java.i...@gmail.com wrote:
> how to fetch the last five records in mysql through php
1. save all query results in array, and use array_slice() get last
five records.
[php]
$a = range(0,100);
var_dump( array_slice($a, -5));
2. modify u SQL cmd "ORDER BY DESC limit 5".
so sorry , i can't express myself very well in english.
Navigation:
[Reply to this message]
|