How Select Last Row In A Database
RegisterLogin
How Select Last Row In A Database
Post Description: If You Use Mysql For Your Php Script You Will Find This Short Tutorial Helpful Because It Hels You Selecting The Last Row In A Table
Tags: How, Select, Last, Row, In, A, Database
This Post Was Posted On Oct 19, 2009 By Webune Support #2598
Post Description: If You Use Mysql For Your Php Script You Will Find This Short Tutorial Helpful Because It Hels You Selecting The Last Row In A Table
Tags: How, Select, Last, Row, In, A, Database
This Post Was Posted On Oct 19, 2009 By Webune Support #2598
How Select Last Row In A Database by Webune Support
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
Leave Your Comments
©2011 Webune Forums - Sun Dec 18, 2011 6:55 pm
Powered by: Webune Forums V3
Powered by: Webune Forums V3