MySQL operations

Change a table name ALTER TABLE old_table RENAME new_table; Move a table from one database to another CREATE TABLE new_database_name.new_table_name LIKE original_database_name.original_table_name; INSERT new_database_name.new_table_name SELECT * FROM original_database_name.original_table_name; Difference between…

Continue Reading MySQL operations

Database normalization

Notes taken from Brian Green's excellent video on normalization on youtube : https://www.youtube.com/watch?v=QqlPXKxN6LQ Normalisation is a process of removing anomalies from a database. These anomalies include: insertion, update and deletion…

Continue Reading Database normalization

Ajax using POST

A very simple ajax call <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Test</title> </head> <body> <p onclick="loadDoc()">Click</p> <p id="ajaxOutputHere"></p> </body> </html> <script type="text/javascript"> // call the function immediately when the…

Continue Reading Ajax using POST

PHP Objects Inheritance

<?php class Person{ // constructor public function __construct($first_name, $last_name) { $this->first_name = $first_name; $this->last_name = $last_name; } public function say_my_name() { echo "My name is " . $this->first_name . "…

Continue Reading PHP Objects Inheritance

PHP Objects (general)

<?php class Person{ // constructor public function __construct($first_name, $last_name) { $this->first_name = $first_name; $this->last_name = $last_name; } public function say_my_name() { echo "My name is " . $this->first_name . "…

Continue Reading PHP Objects (general)