Archive

Posts Tagged 'SQL'

SQL - Lez. 1: Introduction and SQL statements

Requirements: No requirements

I decided to write this tutorial, divided into several lessons, for the understanding of SQL, as by his instructions in a few steps we can execute commands that otherwise would need perhaps tens of lines of code, not counting the number of variables to use. In addition, the code we're going to write scripts that will be much more compact and readable by anyone. ... Continue reading

Tag: , Categories: SQL Tags: ,

SQL - Lez. 2: Data types and keywords

Requirements: no requirements

In this lesson we will present the SQL data types and provide a list of language keywords.

Data Types

There are three main types of data:

  • Numbers;
  • Characters;
  • Time;

The first category as represented by integers or floating point.
In the second category we can enclose individual characters or strings.
In the latter case wrap the dates, times and intervals.

Continue reading ...

Tag: , Categories: SQL Tags: ,

PHP - Creating a counter for the site

Requirements:

  • Servers with Apache installed;
  • PostgreSQL Server (SQL Server) installed;


Recommended PHP knowledge:

  • Session variables;
  • The instruction includes;
  • Knowledge of SQL;

This tutorial was tested under a Linux server with PHP 4 and PostgreSQL server with SQL, but there is nothing to try it under Windows, and if you want to use the SQL Server MySQL just replace the functions of PHP for the PostgreSQL with those of MySQL (for the reference manual on www.php.net Vai).

If you want to have an interface for Linux to edit your database, you must go to http://www.greatbridge.org/project/phppgadmin/projdisplay.php.

In this tutorial I will explain how to create a counter for their website.

You must create a database in PostgreSQL with counter name contains only one field, called hits, numeric type (int8), belonging to the table count.

Continue reading ...

Tag: , , , Categories: PHP Tags: , , ,