...Beauty, cleaning, DIY tips and more - free to join!
   Login   Contact us   Site map   Puzzle Club   Ask a question    Newsletter

How To Insert The Current Date With MySQL

Computing : Learning PHP

When you use mySQL there are many functions to make your life easier.

Typically if someone signs up to a subscription service you may want to log the date on which they signed up, or perhaps when they log in again.

Many novice users who know PHP but nothing about mySQL queries will take the suitable parts of the date and stitch together, with a few calls to gmdate() for instance, getting the relevant d,m,y then joining them together with hyphens.

However a simple call to CURDATE() will give you what you are after: the current date.


By: Stephen

Share on Facebook: On Twitter: TwitterTweet this!

  Reply to How To Insert The Current Date With MySQL

  Receive Our Newsletter




Questions about PHP and mySQL:

Ask question

More Articles:
How to toggle open windows in Windows
Network Management
How to create a talking email