PHP Questions Home | Register | Login
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 return the date with mySQL?


Often there will be times where you want to return the date in your mySQL query or insert it into a table.

For instance when a user registers for the site, you might want to record the date they registered on, and so forth.

To do so, use the CURDATE() function within mysql, like this:

<?php
$todayis 
mysql_query("SELECT CURDATE() FROM table");
$itis mysql_result($todayis,0,0);
echo 
"Today is: $itis";
?>



ASK A QUESTION

More mysql PHP Questions

First of all I'm new to php n' mySql . So I just can't figure out what's the wrong in my code. I'm using WAMP and I've created a db named "Try" and in that there is a table named "test". this is my php code and it dosen't give me a

I am unable to make pages for my search result.Below I am giving the code that I am using. Career Search result Yami says

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

I tried to do query,but it didnt work i receive an error message arning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in

What is difference between mysql_fetch_array and mysql_fetch_object?



Custom Search