Search⌘ K
AI Features

Antipattern: Making Bricks Without Straw

Understand the See No Evil antipattern in application development by learning to properly handle database API return values and separate SQL from application code. This lesson helps you identify common error sources and adopt practices that improve debugging and application reliability.

Developers commonly practice the See No Evil antipattern in two forms: first, ignoring the return values of a database API, and second, reading fragments of SQL code interspersed with application code. In both cases, developers fail to use information that is readily available to them.

Diagnoses without diagnostics

Let’s take a look at the code below:

<?php
$pdo = new
...