bodge
ayy lmao
- Oct 31, 2011
- 406
- 54
Hi Devbest, the LIMIT in my mysql_query won't work
It just shows the newest column data and doesn't show any other previous data, even though LIMIT 10 should display the first 10 results from the database.
database table:
Thanks inadvanced
PHP:
$userstatus = mysql_query("SELECT * FROM `users_status` WHERE `user_id` ='".$id."' ORDER BY `status_id` LIMIT 10");
It just shows the newest column data and doesn't show any other previous data, even though LIMIT 10 should display the first 10 results from the database.
Code:
while ($row = mysql_fetch_array($userstatus, MYSQL_ASSOC)){
$status = $row['status_message'];
}
echo $status
database table:
Thanks inadvanced