Errors and additional information

Sometimes you will encounter SQL errors during exploitation.

Collations

Database collation defines the rules for comparing characters within a character set.

(collations will not take the case into consideration when comparing values)

sample collation: utf8mb4_general_ci (case insensitive, two last letters)

Fix:

It is possible for us to force a collation within the query. However, we first need to determine the collation used by application:

SELECT COLLATION_NAME
FROM information_schema.columns
WHERE TABLE_NAME = "<TABLE_NAME>" AND COLUMN_NAME = "<COLUMN_NAME>";

Add this keyword to your SELECT command:

COLLATE utf8mb4_general_ci

Last updated