content top

PHP freelancer Retrieving Data in a Range by SQL BETWEEN

Working with Database Create a database with a specified name if it does not exist in database server CREATE DATABASE [IF NOT EXISTS] database_name Use database or change current database to another database you are working with USE database_name Drop a database with specified name permanently. All physical file associated with the database is no longer exists. DROP DATABASE [IF EXISTS] database_name Show all available databases in...

Read More

Aggregate Functions in MySQL

In some cases, the information we need is not actually stored in the database but we can retrieve it by computing in some ways from stored data. For example, we have OrderDetails table to store order data, we don’t know total of money of all selling products when we look at the table. In order to do so, we can use aggregate functions. By definition, aggregate functions allow us to perform a calculation on a set of records and return...

Read More

mysql_fetch_array

mysql_fetch_array: Why Use It? Do you know what is returned when you used the mysql_query function to query a MySQL database? It isn’t something you can directly manipulate, that is for sure. Here is a sample SELECT query of a table we created in the MySQL Create Table lesson. PHP and MySQL Code: <?php $result = mysql_query("SELECT * FROM example"); ?> The value that mysql_query returns and stores into $result is a special...

Read More
content top