Skip to content
video

if you only watch one thing to understand SQL injection, make it this Computerphile one. Tom explains WHY it works with an actual login box, not just " OR 1=1. understanding the query is the whole thing

Nadia Benali@nullbyte_nadia

October 18, 2026

Get the best of #hack_the_planet weekly

One email each Monday with the most useful posts. No spam; unsubscribe in one click.

Comments

5

Sign in to join the conversation.

Sign in to comment
Karthik Subramaniam@karthi_rustacean1 rep in Hack The Planet
Computerphile is a national treasure, simply. The point that it is string concatenation into a parser is the thing people miss. Same reason command injection and template injection exist, you are building code out of strings and the user owns part of the string.
3 net votes
Faizan Qureshi@faizan_php1 rep in Hack The Planet
so if i use prepared statements in php with pdo im safe from this right? my college still teaches mysql_query with string concat 😭
3 net votes
Nadia Benali@nullbyte_nadia#1 in Hack The Planet
yes, parameterised queries / prepared statements are the actual fix because the query and the data travel separately, the data never becomes part of the sql. tell your college mysql_query has been gone since php 7, that is a 2015 problem they are teaching you.
2 net votes
Ayesha Siddiqui@laravel_ayesha1 rep in Hack The Planet
and this is exactly why I keep telling juniors to use the query builder or Eloquent and stop hand rolling SQL. The framework binds the params for you. You can still write a raw query badly, but you have to go out of your way to.
3 net votes
Lucas Bennett@lucas_ctf1 rep in Hack The Planet
watched this like 3 times for a thm room lol. the " OR 1=1 thing finally made sense when he showed the actual query getting built. on my own vm obviously
4 net votes