hi, welcome to webune support forums. today we will teach you something very important when creating your php scripts using a MySQL database.

for example, lets say we want to get the last row in a MySQL database table, so how can we do this? easy.

for the purpose of this short tutorial, lets say i want to select the last user that signed up to our forums. this is how i would do it:

PHPCODE:
$query = "SELECT username from users ORDER BY user_id DESC LIMIT 0,1";


that will give you the LAST username in my users table

hope that helps.. REMEMBER, if you need quality PHP/MySQL web hosting, Webune is always here for you.

thanks
Webune Support Team