Categories
PHP / MySQL

Ajax Login form using PHP and MySQL

Today I would like to show you Ajax login functionality implementation using PHP and MySQL. We gonna use MySQL PDO driver in this tutorial. PDO has a much nicer interface, you will end up being more productive, and write safer and cleaner code. Create Ajax Login Form Login Form Create a file called login_form.php with […]

Categories
PHP / MySQL

MySQL Sub Queries

I this post I would like to write about sub queries. A Sub-query is also a query, which is defined under a main query and embedded within the WHERE clause . It always sends a value to its nearest main query. Sub-query is also know as Inner query or Nested query. A Sub-query is used […]

Categories
PHP / MySQL

MySQL IF Function

In this tutorial, you will learn how to use MySQL IF function. MySQL IF function is one of the MySQL control flow functions that returns a value based on a condition. The IF function is sometimes referred to as IF ELSE or IF THEN ELSE function. The IF function takes the following three arguments, the […]

Categories
PHP / MySQL

MySQL LOWER() and UPPER() Functions

You can use either the MySQL UPPER() or LOWER() functions to format columns in your SQL SELECT statements or you can use these functions in conjunction with the other functions to accomplish different types of formatting. Note: UCASE() is a synonym for UPPER() and LCASE() is a synonym for LOWER(). The MySQL LOWER() function converts […]

Categories
CodeIgniter

How to connect to MySQL database in CodeIgniter?

Yesterday someone asked me to make a tutorial about Connecting to Database in CodeIgniter Framework. In order to make connection to database in Ci , we need to do only few configuration changes in your database.php config file which is located at application / config / database.php. After making changes to database.php config file, we […]

Categories
PHP / MySQL

How do i Query to Count Last 3 Days Recourds in MySQL?

One of my new Project, I need to Display Latest Updates of last 3 days. With MySQL’s date_add we can achieve result, see the below example. Note that I’m using a negative date value. You can use a positive date value to get tomorrow, next week, next month, etc..

Categories
PHP / MySQL

PHP Function to get data from MySQL Database?

Data retrieving is vital in Web Applications, so in this post i am going to write about Data Retrieving function in PHP From MySQL Database. There are several options are available to fetch data from MySQL Database Using PHP. However i am gonna write about most frequently used methods. Functions List : mysql_fetch_arrray() : This […]

Categories
PHP / MySQL

MySQL With Handling Duplicates ?

This post explains, how to prevent the duplicate occurrence in the table and how to deal with already existed duplicate records. we can private duplicate record occurrence in the table with the use of primary key and Unique Key Index on appropriate filed. Displaying Different Values(only once): The DISTINCT keyword is used for displaying different […]

Categories
PHP / MySQL

Nested Menu categories with single MySQL query using PHP?

Today I am gonna write about Nested Menu Categories with Single MySQL Query, Here I will show you how to create a simple nested menu with single Query and Single Table. I am giving inline comments so that you can follow easily