This article describes how to use php to insert data to the datetime type of MySQL, if you are curious about this technique of using php to insert data into the MySQL datetime type, the following articles will unveil its mystery.
We need to use the
Description of whether the MySQL time field uses INT or DateTime. When parsing DEDECMS today, we found that the MYSQL time fields of deder all use 'senddata' int (10) unsignedNOTNULLDEFAULT0. then we found this article online, it seems that if the
Today, when parsing dedecms, the MySQL time field found in Deder is usedint (notNULLDEFAULT'0';Then found this article on the Internet, it seems that if the time field has to participate in the operation, with int better, one does not have to
During MySQL query time period, it will be more efficient to select INT, or will it be more efficient to select DateTime? To solve this problem, we will perform a test to see whether INT or DateTime should be used in the MySQL query
Performance Comparison of insert records in a php database. I am engaged in C #. recently, for some reasons, I am also learning php.
I tested a piece of code today. it is very easy to write a row of records into the database. Taking a look at the
When parsing DEDECMS today, we found that deder's MYSQL time fields are all used
'Senddata' int (10) unsigned not null default '0 ';
Later, I found this article on the Internet. It seems that if the time field is involved in the
When parsing DEDECMS today, we found that the MYSQL time fields of deder use the INT type, and then we found this article online. it seems that if the time field is involved in the calculation, it would be better to use the int type, first, you do
Today, when parsing dedecms found Deder mysql Time field, are used
' SendData ' int (a) unsigned not NULL DEFAULT ' 0 ';
Then find this article on the Internet, it seems that if the time field has participated in the
MySQL table structure where the fields
my_dateDateTime DEFAULT NULL,
See a simple Insert code first
$sql = "INSERT into My_test (my_date) VALUES (')";
Mysqli_query ($DBC, $sql);
Insert failed How do I insert an empty string into mysql datetime or
Beginner Php+mysql, when developing a simple registration process, it is required to add a date field after each newly inserted record to facilitate later query and sorting. So immediately Baidu, found that you can use DateTime or timestamp two
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.