Skip to content

Tag: php

Laravel Eloquent where field is X or null

I have a table like this: Now I want to get all entries where field1 is 1, field2 is null and where datefield is smaller than X or null. I already tried something like this: but thats not working. I always get every entry where datefield is null. It doesn’t matter what the other fields are. I also tried…

Binding String using MATCH AGAINST in query

Binding to prepare statement using mysqli is working fine when I’m using query like this but it’s nott working when I’m using this query What is the right way of using MATCH() AGAINST() with a question mark in query for binding value. Answer New full code based on pastebin: The problem was f…