Better check:
```if (!empty($sql)```