What are the different storage engine present in MySQL?
There are 5 different types of storage engine present in MySql. MyISAM Heap Merge INNO DB ISAM MyISAM is the default storage engine for MySQL
What are default session time in PHP?
PHP | What are default session times in PHP? By default, session variables last until the user closes the browser or leaves the site otherwise most of the server terminates the session variable if you …
Automatically change the html element size using css.
CSS | Fluid typography Changing size of text, image, div or any html element automatically without using any jquery or media queries. It is a fluid type technique that doesn't require any JavaScript. Using viewport …
How we can find last insert id in table?
MySQL | Find last insert id in the table By using the MySQL function mysqli_insert_id() we can retrieve the last inserted id in the database table. <?php $con = mysqli_connect("localhost","user_name","user_password","db_name"); if (mysqli_connect_errno()) { echo …
How can you enable errors in PHP ?
Enable errors in PHP There are two ways to enable error reporting in your PHP scripts: 1. You can add the following function in the the script: error_reporting(E_ALL); 2. You can add the following option in …
What is the best collation to use for MySQL?
MySQL | What is the best collation to use for MySQL? Mostly we use: utf8_general_ci utf8_unicode_ci utf8_general_ci is used for fast sorting but it is less accurate whereas utf8_unicode_ci is used for better accuracy but …
How can we optimize a table?
OPTIMIZE command is use for optimize a table. OPTIMIZE TABLE `users`
How many types of messages can you log in Codeigniter?
Codeigniter | Types of error logging There are three message types in Codeigniter: Error Messages These are actual errors, such as PHP errors or user errors. Debug Messages These are messages that assist in debugging. …
How can we increase the speed of a MySQL select query?
MySQL | Increase the speed of a MySQL select query For increasing the speed of a query we have to do a couple of things First of all instead of using select * from table1, use …
What type of inheritance supported by php?
PHP | Inheritance PHP mainly supports two types of inheritance: Single inheritance Multilevel inheritance
How can we find the number of rows in a result set using PHP?
PHP | Find the number of rows in a result set Bellow code is use for the same $sql = "SELECT * FROM table1"; $result = mysql_query($sql, $db_link); $num_rows = mysql_num_rows($result); echo $num_rows;
What is difference between == and === operator ?
PHP | What is difference between == and === operator? "==" and "===" The two operators are known as comparison operators. "==" (i.e. equal) and === (i.e. identical) both are use to check values are …
What is the difference between a session and cookies in PHP?
Session V/S Cookies A cookie is an array of data stored by the browser on the client location and sent to the server with every request. It stores a limited amount of data about 4kb(i.e.: 4096 …
What are data types in php?
PHP | What are data types in PHP? Variables can store data of different types, and different data types can do different things. PHP supports the following data types: String Integer Float (floating-point numbers - …
What are the errors in below code? What will be output and how can you fix it?
PHP | Array error fix | array_merge() The output will be as follows: array(2) { [0]=> int(1) [1]=> int(2) } NULL NULL It will also generate two warning messages as follows: Warning: array_merge(): Argument #2 …