WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Database Discussion Forum This is the place to find help resolving those nagging questions you have about implementing and using all kinds of databases. Need help writing a query? Need an opinion on Oracle? Post here!

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-15-2004, 04:49 AM
WebProWorld Member
 

Join Date: Feb 2004
Posts: 46
redstarfcs RepRank 0
Default Working with days

Hi,

I have a database where I insert datas everyday. Does MySQL has a command which let me select all the datas that were inserted the day before?

Ex. If I run today the query, the databases shows all the datas from yesterday.
Reply With Quote
  #2 (permalink)  
Old 08-15-2004, 12:23 PM
mushroom's Avatar
WebProWorld Veteran
 

Join Date: Feb 2004
Location: Queen Charlotte B. C. Canada
Posts: 351
mushroom RepRank 0
Default

It will depend on the date and time column type you are using (date, time, datetime, timestamp )

The php funtion "date("Ymd"); will give you todays date.
__________________
Irony: That for most people the most "trusted" web site on the planet is for a company the has been convicted of criminal activity.

Both Security and SuSe start with "S". www.oldslides.com
Reply With Quote
  #3 (permalink)  
Old 08-16-2004, 12:49 PM
ronniethedodger's Avatar
WebProWorld 1,000+ Club
 

Join Date: Aug 2003
Location: Central US
Posts: 1,581
ronniethedodger RepRank 0
Default

redstarfcs, I am not sure what language you speak but PHP has documentation for their commands here http://www.php.net/docs.php. You will find a lot of the answers for the php functions you will need to use after you select your data from the MySQL database.

The date and time functions in question are at http://www.php.net/manual/en/ref.datetime.php for more information on those.

The MySQL manual is at http://dev.mysql.com/doc/mysql/en/index.html. Their date and time functions are at http://dev.mysql.com/doc/mysql/en/Da...functions.html
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum
Tags: ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0