sandy1028 Posted January 18, 2008 Share Posted January 18, 2008 Hi, How to fetch the first value which is in database of current date. Suppose current date is 18th Jan How to fetch the first value entered in the database of the current day Quote Link to comment https://forums.phpfreaks.com/topic/86621-how-to-fetch-the-value/ Share on other sites More sharing options...
rajivgonsalves Posted January 18, 2008 Share Posted January 18, 2008 first value you mean first row if so use the limit statement... select * fromt tablename limit 1 Quote Link to comment https://forums.phpfreaks.com/topic/86621-how-to-fetch-the-value/#findComment-442631 Share on other sites More sharing options...
fenway Posted January 18, 2008 Share Posted January 18, 2008 first value you mean first row if so use the limit statement... select * fromt tablename limit 1 That's not the first row... there is no first. That's a random row. If you want the first by date, ask for it -- WHERE yourDate = CURDATE() ORDER BY yourDate DESC LIMIT 1. Quote Link to comment https://forums.phpfreaks.com/topic/86621-how-to-fetch-the-value/#findComment-442792 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.