Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php mysql insert date time

<?php $mysqltime = date('Y-m-d H:i:s'); // this will provide you current data ?>
Comment

how to insert date in mysql using php

$sample1 = "insert into table (id,date) value(1,'".date("Y-m-d H:i:s")."')";

$sample2 = "insert into user (name,date,created_by) value('perasuah negara', now(), 1)"
Comment

PREVIOUS NEXT
Code Example
Php :: php if else 
Php :: laravel throw function 
Php :: laravel observer events 
Php :: delete model laravel 
Php :: pdo bind param 
Php :: laravel eloquent mass update 
Php :: how to get week start date in php 
Php :: laravel nested query builder 
Php :: update role spatie 
Php :: laravel query builder select first 
Php :: codeigniter 4 limit query 
Php :: check if phone number is valid php 
Php :: php file extension 
Php :: laravel faker seeder 
Php :: php force array keys trim 
Php :: get request data in observer laravel 
Php :: laravel query builder get data as array of array 
Php :: laravel validation greater than or equal to 
Php :: php pdo postegresql connection 
Php :: how to change woocommerce read more text 
Php :: redirect in php 
Php :: calculate days of a month 
Php :: request file create cammand laravel 
Php :: get day from date php 
Php :: delete previous uploaded image when update laravel 
Php :: laravel is route name 
Php :: php string left 10 characters 
Php :: php pdo error handling 
Php :: laravel eloquent many to many query using whereHas 
Php :: type casting in php 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =