I'm having an issue which I've been trying to solve for the past hour, and I can't seem to work it out. I've tried Googling for an answer, but haven't found one that works in my case, or at least I haven't been able to get it working.
Here's my code:
@foreach (var row in db.Query("SELECT * FROM PersonnelFiles WHERE (Badge LIKE '#1003' OR Badge LIKE '#1004' OR Badge LIKE '#1005' AND Archived is not true) ORDER BY Badge ASC"))
{
<li>@row.Rank - @row.Name, @row.Badge</li>
}
So according to my knowledge which is limited, it should now return all entries where badge is like "#1003", "#1004" or "#1005", provided that these are not Archived.
But when trying to do this, it gives me an error: "Incorrect syntax near false".
I hope you can help me, thank you in advance.
EDIT: Archived is a bit datatype.