Updating Data within the Database Using PHP

If you want to update any record within the table of the database then you can make use of the mysql_query function and use the update command.  You can use any query using the mysql_query function and solve your purpose. Example:  <?php         if(isset($_POST[‘update’])) {  $db_host = ‘localhost:3036’;   $db_user = ‘root’;   $db_pass = ‘rootpassword’;   $db_conn = mysql_connect($db_host, $db_user, $db_pass);… Read More »

Using Paging via PHP

Whenever we fetch data from the database, we are nor sure about the amount of record that is present there. We need to manage the record so that it would not look messy and should be handled in an appropriate way. So we have to divide the records to be displayed per page that’s where we use the… Read More »

PHP – Inserting the Data to the Database

Inserting data to the database is the same process as creating or deleting the database. You can use the same function mysql_query to add the data to the table. Example- <?php $db_host = ‘localhost:3036’; $db_user = ‘root’; $db_pass = ‘rootpassword’; $db_conn = mysql_connect($db_host, $db_user, $db_pass); if(! $db_conn ) { die(‘Connection failed: ‘ . mysql_error()); } echo ‘Success’; $db_sql… Read More »

What is OLAP? Online Analytical Processing – Types & Benefits

OLAP (Online Analytical Processing) OLAP (Online Analytical Processing) is a particular category of the software that offers users to analyze information from various database systems at the exact time. OLAP is a type of technology that allows analysts for extracting and viewing business data from various points of view. Analysts usually require being grouped aggregated and joined data… Read More »

What are Statistics and Probability?

Introduction Statistics and probability form the central point of data analysis, manipulation, and formatting. Methods like mean, mode, median, standard deviation, etc. are used in almost all data science problems. In this article, we will discuss the most important and widely used methods of statistics and probability for data science. Examples and Importance of data Data is a… Read More »

Deleting the Database using PHP

You can delete the database in the same manner as you created the database using the mysql_query function. Example <?php $db_host = ‘localhost:3036’; $db_user = ‘root’; $db_pass = ‘rootpassword’; $db_conn = mysql_connect($db_host, $db_user, $db_pass); if(! $db_conn ) { die(‘Error: ‘ . mysql_error()); } echo ‘Success’; $db_sql = ‘DROP Database demo_db’; $db_retval = mysql_query( $sql, $conn ); if(! $db_retval… Read More »

Creating a Database using PHP

Creating Database PHP allows the use of mysql_query function to create a database. But in order to create and delete a database, you must have admin rights on the database. This function takes two parameters to create a database. Syntax bool mysql_query (sql, connection); Where, SQL is the query with which you will create the database. Connection (optional)… Read More »

PHP and MySQL

Well, PHP has support for almost every database like oracle, Sybase but developers mostly prefer MySQL database over others. Before starting with the programming we need to have some pre-requisite for the database part. You should have downloaded the compatible version of MySQL for your PHP. Create a database that will store your PHP data and connect with… Read More »