MySQL is designed around doing good JOINS. Databases like looking up records from related tables; it makes them happy. As such, its a good idea to store every piece of data exactly once: then there’s only ever one place to store it.
1 | SELECT |
This is really fast because EVERY SINGLE JOIN is a Primary Key look up. WebScale aficionados know that PK searches are the fastest look up available to MySQL: its only limited by the speed of light inside the CPU cache-bus-lines.
Creating a new order is Super EASY! Let me show you:
1 | // Use $_POST instead of $_GET ($_POST cant be faked |
Whoever said PHP and MySQL couldn’t scale????