...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.


Profile image!
By: Stephen

  More about PHP and mySQL

  Reply to How To Insert The Current Date With MySQL

  Receive Our Newsletter

  Send to friend

PHP and mySQL picture



Questions about PHP and mySQL:

Ask question

More Articles:
How to select the same field from two tables in one query
I was sold something online not as described. Refund?
Share content with other websites to boost traffic