unable to display values from array in a view |
tried to pick the last_query, and the result is strange:
echo $this->anotherDb->last_query(); die(); SELECT `payment_amount` FROM `payments` WHERE `payment_student` = '44' AND date_format(fee_month,"%d-%m%Y") >= date_format(curdate(),"00-%m-%Y") AND `payment_status` =0 Let me remove that date check too.
I already suggested in this thread:
https://forum.codeigniter.com/thread-69443.html to use a JOIN statement to fetch the data in one query. Besides that, you can't compare dates that are converted to an international date format string. "26-01-2017" is greater than "04-11-2017", but that's not the result that you want, do you? |
Welcome Guest, Not a member yet? Register Sign In |