Ravi Sir's Cyber Security Cards › Revision Cards
UPDATE
UPDATE UPDATE changes existing rows. Example: UPDATE students SET city='Nashik' WHERE id=5; A weak “update profile” page can let attackers change other columns, like role='admin' , or other users’ rows. Fix: prepared statements and server-side permission checks. Pressing Enter before writing WHERE.

Read card text
What this card says
What it is
UPDATE changes existing rows.
Example: UPDATE students SET city='Nashik' WHERE id=5;
Why it matters for security
A weak “update profile” page can let attackers change other columns, like role='admin', or other users’ rows.
Fix: prepared statements and server-side permission checks.
Common mistake
Pressing Enter before writing WHERE. The whole table changes.
Rule: write SELECT … WHERE first, check the rows, then change it to UPDATE.
Learn more in the lesson: 11.1 UPDATE