Skip to main content

Posts

Showing posts from July, 2017

Swap Two number Program in PHP

Swap Two number Program in PHP Swap two number with each other means interchange their value. Suppose you have two number a and b a contain 6 and b contain value 5 after swap their value, a have 5 and b have 6. basically 2 method of interchange value a-using third variable, b-without using third variable(Using Arithmetic Operators), c-usign multiplication, d-bitwaise XOR operation, a-swap two number using third <?php $a=10; $b=20; echo "Value of a: $a</br>"; echo "Value of b: $b</br>"; $a=$a+$b; $b=$a-$b; $a=$a-$b; echo "Value of a: $a</br>"; echo "Value of b: $b</br>"; ?> b-without using third variable(Using Arithmetic Operators), wap two number with each other means interchange their value. Suppose you have two number a and b a contain 10 and b contain value 20 after swap their value, a have 20 and b have 10. <?php $a=10; $b=20; echo "Value of a: $a</b...

Myisam and innodb main defference

Hi Dear all, Myisam and innodb main defference that as following : So these are the main differences between these two engines. You can specify in the query that which engine is to be used while creating the table. CREATE TABLE test name varchar(30) ENGINE = InnoDB; Since MyISAM To check the engines of already existing tables, use the following query. It will list all the existing tables which are present in the current database, with their engines specified. show table status; If you want to view the status of a particular table, then use the following query, show table status where Name = ‘tablename’; MYISAM: MYISAM supports Table-level Locking MyISAM designed for need of speed MyISAM does not support foreign keys hence we call MySQL with MYISAM is DBMS MyISAM stores its tables, data and indexes in diskspace using separate three different files. (tablename.FRM, tablename.MYD, tablename.MYI) MYISAM not supports transaction. You cannot commit and rollback wit...