Getting previous day/month/year records from mysql table
In this post will explain how to get Today, yesterday, last one month record, last year record from database table using Mysql query. Here I have used the MySQL function CURDATE() to get the today’s...
View ArticleHandling Date and Time in PHP/MySQL
Date and time can be inserted into mysql table in specific format only. But php will support different types of date and time formats. So, we should convert the date and time from php into specific...
View ArticleMySQL – 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...
View ArticleHow 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 row from table....
View ArticleDisplaying 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...
View ArticlePHP 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...
View ArticleRemoving 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...
View ArticleConverting 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...
View ArticleSample 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,...
View ArticleHow to store array value in database using php?
Here we discuss about how to update the array value in the database.The concept very helpful to PHP web application because it is used to many situation. you can store the all user information in...
View ArticleDatabase 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...
View Article
More Pages to Explore .....