Hmm, CI throws this error:
Here's a screenshot of the model.
![[Image: JukAGq.png]]()
WANT to pass a variable's text into the query binding but CI is passing the quotes around IS NULL and the SQL query doesnt like that. (Shown in the fourth paragraph of the error).
Am I missing a parameter like 'escape' (if one exists)?
Code:
A Database Error Occurred
Error Number: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''IS NULL' AND plantauth.contributor_id IS NULL ORDER BY 'plantitems.id ASC' at line 4
SELECT * FROM plantitems LEFT JOIN plantauth ON plantitems.id = plantauth.plantid WHERE plantauth.owner_id = '51' AND plantitems.death 'IS NULL' AND plantauth.contributor_id IS NULL ORDER BY 'plantitems.id ASC'
Filename: models/Logbook_model.php
Line Number: 29Here's a screenshot of the model.
![[Image: JukAGq.png]](http://i.sli.mg/JukAGq.png)
WANT to pass a variable's text into the query binding but CI is passing the quotes around IS NULL and the SQL query doesnt like that. (Shown in the fourth paragraph of the error).
Am I missing a parameter like 'escape' (if one exists)?