How-to articles, tricks, and solutions about SQL
Codeigniter $this->db->get(), how do I return values for a specific row?
The $this->db->get() function in CodeIgniter is used to retrieve data from a database table.
Display an array in a readable/hierarchical format
Here is an example of how you could display an array in a readable/hierarchical format in PHP:
How can I prevent SQL injection in PHP?
There are several ways to prevent SQL injection attacks in PHP.
How to properly set up a PDO connection
To set up a PDO connection, you will need to do the following:
Increment value in MySQL update query
To increment a value in a MySQL update query using PHP, you can use the += operator.
PDO with INSERT INTO through prepared statements
To insert data into a database using PDO and prepared statements, you can use the following steps: