Category Archives: Database

SQL Injection

SQL Injection is the exploitation of a vulnerability in relation to SQL databases, which is caused by lack of masking or revise any meta-characters in user input. The attacker tries, on the application that provides access to the database to … Continue reading

Posted in Database, Hosting, PHP, Webmaster | Tagged , , | Comments Off

Moving fields with ALTER TABLE

As is known, called the SQL command ALTER TABLE allows you to manipulate the structure of a table in MySQL. We will see in this very short post as ALTER TABLE can be used to put back a specific field, … Continue reading

Posted in Database | Tagged , , , , | Comments Off

MySQL: from image to image to BLOB and BLOB

In this short tutorial we will see how can export the contents of a field of type BLOB and save it in the form of images, the BLOB fields are typically designed to accommodate large information such as data constituting … Continue reading

Posted in Database | Tagged , , | Comments Off

Check out a record in order of priority

Simple trick by which to extract a previous record to another to auto-increment ID value, imagine you want to remove the previous record that has the ID value “10″ is not mentioned in the table is This ID “9″, this … Continue reading

Posted in Database | Tagged , , | Comments Off

Using the conditions for query UPDATE

A simple trick to update multiple records in the table with a single query is that the conditions of Use, do an example: we have a database of products for which we wish to change the discount on certain types … Continue reading

Posted in Database | Tagged , , | Comments Off

MySQL: The ignorance of Boolean

MySQL is not available natively BOOL data type, it (as BOOLEAN) is nothing but a synonym of another data type that actually exists: TINYINT (1); BOOL value to zero is considered false and values nonzero are considered “true”, false and … Continue reading

Posted in Database | Comments Off

Calculate the size of a MySQL database

Here present a simple query that could be particularly useful for those who have hosting with limited space for storing data, it is a question of fact by which you can obtain the size of a MySQL database. The information … Continue reading

Posted in Database | Tagged , , , | Comments Off

Global Variables in MySQL

Rarely are used to refer to variables when it comes to a declarative language like SQL, but these can be really useful in some cases, such as simple operations for the numbering of the records. In a well-designed database, usually … Continue reading

Posted in Database | Comments Off