⇧
vadnica-logo
My Services About the Project Telegram O meni O meni

Filtering Data (WHERE)

When we want to retrieve only specific records from the database (e.g., a user with a specific last name), we use the WHERE clause. In PDO, we always do this with prepared statements to prevent the injection of malicious code.

EXAMPLE
RESULT
The result will be displayed here...

In the example above, we searched our table of 11 records for a user with the last name "Novak". We will use a named parameter :last_name, which ensures security and clarity.