Search
 
SCRIPT & CODE EXAMPLE
 

PHP

How to insert time in table using CodeIgniter

$data = array(
    'user_id' => $user_id,
    'otp' => $otp
);

$this->db->set('create_at', 'NOW()', FALSE);
$this->db->insert('otp_expiry', $data);

//or 1 day expire

$this->db->set('create_at', 'NOW() + INTERVAL 1 DAY', FALSE);
$this->db->insert('otp_expiry', $data);
Comment

PREVIOUS NEXT
Code Example
Php :: php code to display current date and time in different formats 
Php :: php artisan up 
Php :: php artisan route:list for specific name 
Php :: Install the php_mysql extensions 
Php :: remove .php from url 
Php :: Database//Eloquent//Model.php laravel errror array t- string conversion 
Php :: laravel get file contents from storage 
Php :: laravel migration change default value 
Php :: php string only letters 
Php :: difference between fetch assoc and fetch array or object php 
Php :: Laravel groupby date of created_at 
Php :: laravel get auth user in constructor 
Php :: how to create shortcode 
Php :: php intl 
Php :: sha256 in php 
Php :: how to save information on pdf file in laravel project 
Php :: php cookie never expire 
Php :: cache clear in laravel 
Php :: format date in laravel using carbon 
Php :: remove action from theme wordpress 
Php :: php date modify plus 1 day 
Php :: wordpress get custom post type posts 
Php :: php dump 
Php :: continue php 
Php :: php pi() function 
Php :: wordpress get post by id 
Php :: convert float to integer laravel 
Php :: php json_encode 
Php :: php var exists 
Php :: php abs() 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =