
Search In
Foreign Key is used to establish a link between two tables . It always define in reference of Primary key ( another table ) . It act as a Primary key in its own table and foreign key for another table .
Difference between Primary key and Foreign key
Codeigniter gives the facility to create own helper according to requirement. You can code easily and call inside the codeigniter controller or model.
1) Create a file and put the following code into it.
if ( ! defined('BASEPATH')) exit('No direct
Avg ( ) function is used to return the average of numeric column . If in a table there is null value then it ignored that value .
Syntax :
select avg ( column_name ) from table_name where clause ; // where clause is optional
Example :
Table name
If you want to enter a new records that is not exits then you can use Mysql two methods
Method 1 'REPLACE' :-
REPLACE INTO `users`
SET `userid` = ‘65′,
`username` = 'abc',
`useremail` = 'abc@gmail.com';
In this case if record exists, the query
This function is used to get the maximum value from the selected field .
Syntax :
select max ( column_name ) from table_name ;
Example :
Table name : Employee_Info
Id Employee_name Employee_Age Employee _Salary
1
This function is used to get the minimum value from the selected field .
Syntax :
select min ( column_name ) from table_name ;
Example :
Table name : Employee_Info
Id Employee_name Employee_Age Employee _Salary
1
You can check if( [empName length]==0 || [[empName stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] length]==0) this will return 1 else 0
NSString *empName;
if ([empName length]==0 || [[empName stringByTrimmingCharactersInSe
For running multiple jQuery methods within a single statement,we make use of chaining.
here is the example:
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></s
Hello Reader! If you having an multidiamensnal array and you want to get the max value from a single element key then you see the example below:-
[0] => stdClass Object
(
[id] => TRF1254
[cust] => CUST9897
[amoun
Hello friends,
I am sharing that how we can save csv file data in mysql database. Csv Data consists of rows and columns with comma separated.
for example we have a csv file which contains user first name, last name, age and designation.
like this :
