0

I need to select certain the rows from a table but need to show only just five of them.
For example
select * from table where user = $user;
but i need only top five results

2
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by litlemaster
0

its not working:
$getreplies="Select * from bookmarks LIMIT 0, 5 where user_name in ('$userStr') order by date_time desc LIMIT 0, 5"; //getting replies

0
$results = mysql_query("SELECT * FROM bookmarks WHERE user_name = '$userStr' ORDER BY date_time DESC LIMIT 5");

Edited by diafol: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.