In this tutorial we calculate the distance (Km , meters , seconds) between two cordinates using Select Query in codegniter. Here we just pass thetwo address named address1 and address2 and first we calculate latitude and longitude of both address. Based on these latitude and longitude we calculate distance.
Example:-Suppose we calculate distance from Jalandhar city to Chandigarah city
"address1":"jalandhar","address2":"chandigarah"Then function in model is :
In this tutorial we calculate the distance (Km , meters , seconds) between two cordinates using GOOGLE API. Here we just pass the
two address named address1 and address2.
Example:- Suppose we calculate distance from Jalandhar city to Chandigarah city
"address1":"jalandhar", "address2":"chandigarah" Then function in model is :
public function findDistance()
$from = "jalandhar";
$to = "chandigarah";
$from = urlencode($from);
$to = u
In this tutorial, I will walk you through PHP code to export table from database using php codeigniter.Most of the time my clientsneed to download data from their database tables.Exporting to CSV is a pain in the rear for users and it leads to confusion . Today, I decided to make a very small controller that is portable and efficient for exporting full MySQL tables to Excel .
Follow this example step by step:
Step 1 :Place this function in helper that is called in
In this tutorial, I will walk you through PHP code to import CSV file into MySQL database .The input CSV file is sent via a HTML form. I used fgetcsv() function to read the database table column data from the CSV.
Follow this example step by step:
Step 1: Create HTML form to import csv file.
< form class="form-horizontal" action="" method="post" name="uploadCSV" enctype="multipart/form-data">
< div class="input-row">
< label class="col-md-4 control-label">
In this blog am going to discuss how we can create calendar on the base of month and year . Recently I faced a problem to create a calendar by passing month and year asa argument , trust me it is very easy to create this.Calendar is a very common element in today's web applications. Whether you are building an event booking application, appointment system or even a social network. Calendar is essential.In this tutorial, we go through steps of building a calendar in PHP. After this tutorRead More
In this blog am going to discuss a common error that is occur during creating PDF using tcpdf library. "tcpdf error:-Unable to get thesize of the image" . when we create pdf using TCPDF library set all detail of single page like margin ,width header ,footer etc of a pagewhen we use any image in pdf it is better to give image and their dimensions in function .In this code we create a pdf using explicit function.
Explaination:-$pdf->Image('@' . $img, 24 ,15, '162', '10', 'PNG', ''
Sometime it is tough to handle more complex queries in mysql php. When a single php query include multiple join ,where ,group by ,having clause etc. In this blog am going to discuss "How to handle complex query with group_start and group_end method"This example is in Codeigniter. Suppose we have to select data from two tables using join , where condition ,order by clause ,group by and having clause. In this examplewe also explain How to use selected item in where clause..
This tutorial is about to create folder inside the Bitbucket . when we perform searching on them we found that " BitBucket does not provide you with such a feature to add an folder and manage your repositories inside a folder. " but I suggest you that it is possible . In order to create folder inside bitbucket using ubuntu follow these given steps.
Step 1:- create any folder in your repository.
Step 2:- place any empty file in folder.
remember bitbucket doest not al
In order to connect with aws server you must have aws account . when you create account successfully you must have set privilages to user.
1.) .pem file
2.) .ppk file
For this you required two files. If you don't have don't worry you can download it .
3.) install putty
PuTTY is likely the most-used SSH client for the MS Windows platform that is used to access the server.
Use the following procedure to connect to your Linux instance using an SSH c
In this blog I discuss about the cronjob setting in AWS. Amazon web services is one of the most popular platform to run large and scalable website. Amazon provide no of services to make your web application load fast etc. Configuring cron job on AWS is little bit confusing for first time and i also did not find any proper documentation to setup cron job over AWS so after google some hour and try no method share by the people i finally setup my cron job and ready to shar