jeudi 26 mai 2016

PHP, laravel, why is this query failing on ubuntu?

This works on WAMP just fine:

$db = $instance->Databases->where('db_default', 1)->first();

It assings perfectly the value of the model im looking for, but it doesnt work on Ubuntu and I have no idea why, after hours of trying and trying, I did this:

$db = $instance->Databases->where('db_default', '1')->first();

And it worked correctly, is there something wrong with my Ubuntu 14 install or this is standard behavior? In the laravel docs the query without quotes so I know its possible.

Just in case the db_default field on my database its of type tinyint.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1TY2MPd
via IFTTT

Aucun commentaire:

Enregistrer un commentaire