Sensation Energy

Tutorials


Content


Advertising


Function 7

Multi PHP Mysql







Clone table



Original Table 'accounts'

ID First Name Last Name Email Password
1 admin admin admin@mail.com admin
4 test test2 asdfasd@mail.com admin
5 vacidhd vacdfhfhi@mail.com vacdfhfhi@mail.com
6 admin test test@mail.com
7 admin1 test admin@email.com
8 admin1 test admin@email.com
9 test1 tes2 test3@sensationenergy.com
10 test1 tes2 test3@sensationenergy.com
11 vacidhd vacdfhfhi@mail.com vacdfhfhi@mail.com
12 fghghgh vaci@mail.com vaci@mail.com
13 vacidhd vacdfhfhi@mail.com vacdfhfhi@mail.com
14 Admin admin@mail.com admin@mail.com admin

Clone table accounts to 'accounts2'

ID First Name Last Name Email Password



Change status click

In this table we are change status form 0 to 1 or 1 to 0 only one click.

ID First Name Last Name Email Password Statues 0 1
1 admin admin admin@mail.com admin 1
4 test test2 asdfasd@mail.com admin 0
5 vacidhd vacdfhfhi@mail.com vacdfhfhi@mail.com 0
6 admin test test@mail.com 0
7 admin1 test admin@email.com 0
8 admin1 test admin@email.com 0
9 test1 tes2 test3@sensationenergy.com 0
10 test1 tes2 test3@sensationenergy.com 0
11 vacidhd vacdfhfhi@mail.com vacdfhfhi@mail.com 0
12 fghghgh vaci@mail.com vaci@mail.com 0
13 vacidhd vacdfhfhi@mail.com vacdfhfhi@mail.com 0
14 Admin admin@mail.com admin@mail.com admin 1

IP adress

Ip id Name IP adress
1 admin ::1
2 Test 89.216.200.240
3 test 89.216.200.240
4 admin 89.216.200.240

Example Tables

Category

Category id Category name
1 php
7 mysql

Product

Product id Product name Category id
2 website 2

Outer Left Join

Product id Product name Category name
php
mysql

Outer Right Join

Product id Product name Category name
2 website

With and without JOIN

Inner Join

Product id Product name Category id Category name
Without Join, only where condition

Product id Product Name Category name