php - Laravel != operator in where not working -
:: Table ('Media_Featured') - & gt; Where ('is_video_of_the_week', 1) - & gt; Where ('video_of_week_expected', '! =', 1) - & gt; first (); Create table 'media_featured` (`id` integer (10) unsigned NULL AUTO_INCREMENT,` media_id` integer (10) unsigned default zero, `is_video_of_the_week` tinyint (1) default zero,` is_featured` tinyint (1) default zero, Time-Ampler faucet default tap, `updated_at` timestamp, zero default faucet, 'deleted_at' timestamp less than zero, primary key (` id`), 'deleted', key 'media_featured_media_id_foreign` (`media_id`), concert Media_firette_media_ad_forrence_food Unji ( `Meedia_aid`) terms 'media' (` Aidi`)) engine = Innodibi Autongrement = 6 default charge = UTF-8 Collet = UTF 8_inikod_si; A record can be Any thoughts? Then is a column, to check if In the case of laravel database query generator you can use method PS: If it is considered is_video_of_the_week = 1 and
video_of_week_expired = zero but the query above provides the null.
zero values are not equal to or equal to something else.
column! = Zero is always with falsy,
column = zero
zero
is required to use zero operator.
- & gt; whereNull ('video_of_week_expired')
video_of_week_expired . If there is a flag-like column, you make it
not and
0 /
1 instead of
zero Using> /
1
Comments
Post a Comment