I this article we explain how to use joins in codeigniter active record query. using of codeigniter active record joins you can write complex join queries easily and also active record queries is safer and support all database because of codeigniter handle this automatically.
In codeigniter active record you can join multiple tables. here explain different type of join queries with example.
use join() method in active record for applying join on multiple tables, below show join() method parameters :
$this->db->join(TABLE_NAME, CONDITION, JOIN_TYPE); //JOIN_TYPE = left,inner,right and etc
I this article we will provide complete code with demo for convert given date time into timestamp using php and show time-ago format. we have create custom date_time_ago() function, in this function need 3 parameters first is your date time string, second one is date time format and third is time format.
$input_date – this is your date time string
$date_format – this is date time complete format, if time ago grater then 2 days then date show in this given format.
$time_format – this is time format when show time, like Yesterday at 6:45 PM
Firebase Cloud Messaging(FCM) is a google cloud messaging service it is used for sending notification and messages in cross-platform for android, web application and ios application, which is available at no cost.
If you want to use this service in your application please just follow below simple steps and then you can send notification using google FCM(Firebase Cloud Messaging) service.
MySQL Database Table for store user device ids and store data in table
I this article, I would like to explain how to change/replace database all tables prefix. it is very simple so please just follow below steps and you can change all tables prefix of any database.
Step 1 : Please login into your phpmyadmin, After login into your phpmyadmin, you will find list of database in left sidebar. please select database in which you want to change/replace tables prefix. please see below screenshot :
sometimes we are use single page for render html and response ajax request, so we need to detect ajax request or page render request.
In this article i would like to explain how to detect ajax request in Core PHP, Codeigniter and Zend framework and process your code.
Detect Ajax Request In Core PHP
This below code catch ajax request and provide event, so you can process your ajax operations.
//ajax detection code
if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest' )
// do something
//write your ajax code here