MySQL basics: tables and your first queries
Create a table, add rows, read them back, change and delete them. The four commands you will use every day.
Learn
Practical lessons drawn from years of teaching and real projects.
Create a table, add rows, read them back, change and delete them. The four commands you will use every day.
How data travels from a form to PHP, which method to use, and how to print it back without opening a security hole.
See every problem on your computer, and hide them from visitors on the live site.
Smaller, correct types make tables faster and prevent wrong data.
Read exactly the rows you need, in the order you need.
One reusable connection file with safe settings.
Small values stored in the browser, and the flags that make them safer.
Keep a logged-in user's data between pages, and end the session properly.
Reuse headers, footers and settings instead of copying them.
The string functions you will reach for every day.
Lists, key-value pairs and the array functions that save the most time.
Define functions with parameters and return values, and give them safe defaults.
Make decisions and repeat work with if, switch, for, foreach and while.
Store values in variables and learn the five types you will use every day.
See the problem with building SQL from user input, and the one-line fix.