0

I am trying to fetch data according to current date. data only show on current date

$user1 = $wpdb->get_results("select product,checked_by,submit_date,suppliers,comments,van_temperature from diary_user_form_storage  where category_name='delivery_form'");
3
  • 1
    diary_user_form_storage is not a wordpress table. which plugin creates it ?
    – mmm
    Oct 23 '17 at 13:42
  • You just need to add a where clause, i.e. where 'submit_date' == todays date?
    – ProEvilz
    Oct 23 '17 at 14:12
  • ProEvilz@i hvae solved this thanks for your suggestion man Oct 24 '17 at 5:00
0

Well dear thanks for your effort.I solved this .here is answer.

$user1 = $wpdb->get_results("select product,checked_by,submit_date,unit_data,temperature_in,temperature_out,time_in,category from diary_user_form_storage  where category_name='opening' and DATE(`submit_date`) = CURDATE()");  

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.