Home / mySQL (page 4)

mySQL

SQL Query Interview Questions with Answers

Hi all, Today I share one important topic related to SQL. SQL query is very important. This article mainly focus sql query related to interview questions and answer. In this article, I am giving some examples of SQL queries with answer which is frequently asked when you go for a …

Read More »

mysql_close() function:PHP

To close an open MySQl connection in php, the mysql_close()helps to perform this function. The mysql_close() function is not the necessary part in our program. In non-persistent open links are automatically closed at the end of the script’s execution. Syntax mysql_close(connection) Example [crayon-614424d84a2d5839034651/] Output : connected successfully at:26/07/10 : 09:31:14 …

Read More »

Fetch MYSQL table data – PHP

Welcome to all, Here we discuss one useful topic related to MYSQL,fetch the data from data base in MySQL using PHP. From the MYSQL database the data can be fetched by executing SQL SELECT statement through PHP function mysql_query. The mysqli_fetch_array() or mysql_fetch_array() function is most frequently option. This function …

Read More »

mysql_connect() and mysql_pconnect()

Hi all, Nobody knows what are the main differnce between MYSQL_CONNECT() and MYSQL_PCONNECT(). MYSQL_CONNECT() and MYSQL_PCONNECT() are working for database connection. But these two have some little diffrence. In mysql_pconnect(), ‘p’ stands for persistance connection. The mysqli_connect() function opens a new connection to the MySQL server. Every time it is …

Read More »

SQL LIKE Operator

Good morning to all, Welcome to SQL commnands, queries, operators etc. Now we are discuss the SQL LIKE operator. The LIKE operators used to fetch the data from database foor specific pattern. The LIKE operator is used to search for a specified pattern in a column used in WHERE clause. …

Read More »

Reset Auto-Increment – MySQL

Good morning to all, Here I going to demonstrate how to reset auto-increment value in MySql. Assign to auto-increment attributes to a column of a table, to generate unique identity for the new row. If new row is inserted it incrementsthe value one. Whenever you insert a new row into …

Read More »

SQL JOINS

Hi all, The SQL joins are used for combine rows from two or more table based on a common field between them.We are discuss this topic today. It fetch data from two or more tables and which is joined to appear as single set of data. Join Keyword is used …

Read More »

Truncate, Drop and Rename a Table- SQL

Hi all, Here I share some useful information in sql queries like truncate command, drop command alter command. These is more helpful in MYSQL operations. For delete complete data from an existing table using TRUNCATE command. And also delete the data inside the table. For delete a table using DROP …

Read More »

Sorting Arrays – PHP

Welcome to all, Today we practise how to sort an array using php. We know this same problem solving using C, CPP or JAVA etc. But here I share how to solve this problem in php. To arrange the elements in an array in numerical order from highest to lowest …

Read More »