Blog Archives

In this section, you’ll be getting started with MySQL.You will learn how to use MySQL effectively to get your work done more productively. You will also learn how to manage databases, insert data into database tables and get data back by using various SQL queries.

Basic SQL Questions and Answers

What is DBMS? A Database Management System (DBMS) is a program that controls creation, maintenance and use of a database. DBMS can be termed as File Manager that manages data in a database rather than saving it in file systems.

Posted in MySQL, SQL Tagged with: , ,

Database learning for Beginners

Basics of SQL: SQL stands for Structured Query Language. It is a language for storing and retrieving information/data from databases. So we can say, SQL as the Standard Database Language. The scope of SQL includes data insert, query, update and

Posted in MySQL Tagged with:

How to store array value in database using php?

Here we discuss about how to update the array value in the database.This concept is very helpful in PHP web application as it is used in many situations. You can store the user’s information in a single table. It is

Posted in MySQL, Php Tagged with: , , ,

Sample PHP code for creating forgot password feature in any website

Most of the websites will require the users to register them for getting username/password which can be used for logging into their website. It is very common that the users forget their password. So, the websites should allow the users to

Posted in MySQL, Php Tagged with: ,

Converting Letter Case in php/MySql

Sometimes we might be in need to convert the output results in upper case or lower case format MySQL comes up with a solution for that where you can use LCASE and UCASE to convert the results into any one format completely. LCASE can

Posted in MySQL Tagged with: ,

Removing Last Character in a String

In PHP, we will be requiring to remove the last Character from a string variable. For example, consider below query. select * from employees where employee_id in (1,2,5,7) Assume that the employee_id values 1,2,5,7 should be dynamically collected from a

Posted in MySQL, Php Tagged with: ,

PHP function to get the ID generated from the previous INSERT operation in mysql

It is necessary to get the ID (auto increment field) of a row inserted into a mysql table if the table is having any parent-child relationship with one or more child tables. For example, assume that we are entering questions

Posted in MySQL, Php Tagged with: ,

Displaying Random records from MySQL database table

Sometimes we may need to display some value selected from database table which is having many records. In this situation we can select them randomly to improve user experience. It applies to displaying random advertisements, testimonials, quotes,images,background colors and news.

Posted in MySQL, Php Tagged with: ,

How to get last row from database table

If you want to find last row in a table in your database there is no need to loop through to get the last record .Mysql provides you with a provision for that . It is easy to find last

Posted in MySQL Tagged with: ,

MySQL – Resolved null issue in query.

We have faced strange issue with MySql old version (version 4). Our php file will pass a querystring variable “id”. It can have a value or it can be empty in some situation. Initially, we used below code, $id=$_GET[‘id’]; $sql=”select

Posted in MySQL Tagged with: ,