How can we optimize a table?
OPTIMIZE command is use for optimize a table. OPTIMIZE TABLE `users`
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 …
How can we find the number of rows in a table using MySQL?
MySQL | Find the number of rows in a table We can use the below query to count the number of rows in a table >SELECT COUNT(*) FROM table_name;
Add bar chart in web page
Chart.js | Add bar chart in the webpage This is a simple example of using Chart.js to create a bar chart on the webpage. Step 1: Create a basic HTML file called "chart.html" <!DOCTYPE html> …
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 …
What are triggers in Mysql?
Mysql | Trigger The trigger can be defined as a database object just like a stored procedure. It is a set of actions that fires automatically when an event occurs in a database. Triggers …
What is the maximum size of a file that can be uploaded using PHP and how can we change this?
PHP | The maximum size of a file that can be uploaded using PHP The default maximum size of a file that can be uploaded using PHP is 2MB. upload_max_filesize = 2M; and we can …
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 …
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 …
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;
How to convert a string to array ?
PHP | How to convert a string to an array? string to array There is a function in PHP called explode() which is used to convert any string to an array. <?php $str = …
How can we remove duplicate value from an array in php?
PHP | Remove duplicate value from an array Duplicate value can remove from an array by using the array_unique function. If two or more array values are the same, the first appearance will be kept …
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 superglobal/global variables ?
PHP | What are superglobal/global variables? Superglobal is out of scope limitation. These variables can be accessed from any function, class, or file without doing anything special such as declaring any global variable, etc. These …