PHP Questions Home
Categories
Arrays
Files
Forms
Creating PDFs
PHP Errors
Functions
Images
MySQL
Numbers
Others
Strings
Website

PHP Forums
Forums Index
MySQL Forum
PHP Forum
Flash/Actionscript
Javascript
Web design

More PHP
PHP Functions
Top Questions
Ask a Question
PHP Interview Questions
PHP Jobs
Ecommerce
IT Questions
Business Websites

Sponsors

sponsor ad
My Salary
PHP Developer Salary
Advertise Here

How do I access the current time with mysql?


Another common query is to get to the current time in addition to the date within mysql.

When you want to log when something happens - for instance a post to your message board, this will be a particularly useful thing to know.

With the current time and date you will need to use NOW() like so:

<?php
$update 
mysql_query("UPDATE my_users SET lastlogin = NOW() WHERE username = 'elvis'");
?>



ASK A QUESTION

More mysql PHP Questions

What is the correct way to connect to a MySQL database?

how can I show an image from mysql?

First i created the log in page now i want to connect to the database from where username and password table is save.How i create the php codes to give relation between them?

I am extracting data from a MySQL Database of which one of the data stored is seperated by a comma. For example, step1,go here,step 2,go there,step 3,go back etc etc. I want to know how to split the data at the comma and format it in html. Using the split

How do I delete a row from a table?



Custom Search