Tag Archives: date

updateOrCreate where date is greater than today

Questions: Is there a way to updateorcreate records in a table where the created_at date field is greater than today(midnight)? I have the following sample: Model::updateOrCreate( [ ‘match_id’ => $match->id, // ‘created_at’ => some query here to match a record created today ] ); Answers:

update batch (multiple update) codeigniter not working

Questions: why my update_batch in codeigniter doesn’t work ? i tried copy-paste result query from codeigniter to phpmyadmin also doesn’t work here is last_query result UPDATE resquest SET request_status = CASE WHEN request_part_id = ’72’ THEN ‘accepted’ WHEN request_part_id = ’73’ THEN ‘accepted’ ELSE request_status END WHERE request_part_id IN(’72’,’73’) and here is my update batch… Read More »

How to validate that there are no duplicate fingerprints

Questions: I am working with the integrated biometric sdk for android, and I want to validate that fingerprints are not repeated, I found these methods that apparently are for that work ibScanDevice.addFingerImage ibScanDevice.isFingerDuplicated ibScanDevice.isValidFingerGeometry but I can not make them work, the first method always returns 0 and I must return a 1 indicating that… Read More »

How to change default date color and Sunday column color?

Questions: I am customizing the color of default date picker. I have changed almost all color but unable to change date color and Sunday column. Please help me change the date and Sunday color. My style <style name=”DatePickerDialogTheme” parent=”Theme.AppCompat.Light.Dialog”> <item name=”colorPrimary”>@color/colorWhite</item> <item name=”colorPrimaryDark”>@color/colorWhite</item> <item name=”colorAccent”>@color/colorWhite</item> <item name=”colorControlActivated”>@color/colorOrange</item> <item name=”android:background”>@color/colorGreyDark</item> <item name=”android:textColor”>@color/colorWhite</item> <item name=”android:textColorPrimary”>@color/colorWhite</item> <item name=”android:textColorSecondary”>@color/colorWhite</item>… Read More »

MYSQL + php , avoid date conficts

Questions: I have a database with actions such as “Carneval…. +——————-+————+—————+———————–+ + Name + Date + action starts + action duration (min) + +——————-+————+—————+———————–+ + Carneval + 2018-04-30 + 12:00:00 + 150 + +——————-+————+—————+———————–+ + Fairytale evening + 2018-04-30 + 20:00:00 + 200 + +——————-+————+—————+———————–+ How do I avoid puting into database an action like… Read More »

How to validate depending on the selected value?

Questions: I have a simple form: public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add(‘name’, null, [‘required’ => true]) ->add(‘doYouWant’, ChoiceType::class, [‘choices’ => [‘no’ => ‘no’, ‘yes’ => ‘yes’]]) ->add(‘type’) ; } I would like the user after the selection doYouWant to “yes” to have a mandatory “type” option, so I am trying: $builder->addEventListener( FormEvents::PRE_SUBMIT,… Read More »

How can i disable specific date

Questions: I want to disable the specific dates which user selected in another date picker I mean user selects date in first date in date picker and another date picker sets minimum date? Answers: