where clause doesn't work for less and bigger
where clause doesn't work for less and bigger
erickmt
Posts: 15Questions: 3Answers: 1
I'm trying to compare 2 columns in where clause. The page work but the clause doesn't.
->where( 'produto.quantidade_estoque', 'produto.alerta_maximo', '<')
This discussion has been closed.
Answers
Use:
The condition documentation is available here and explains why the
false
is required in an anonymous function. Basically if you don't add thatfalse
it will treat the second parameter as a string, not a column name.Allan
Thank you to answer but it didn't work to me
"DataTables warning: table id=estoque_maximo - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1"
Sorry - it looks like I'm missing a semi-colon at the end of the line in the anonymous function. The error returned by the server should state that.
Allan
Perfect! Thank you!