I'm working on a calendar roster system for work. Unfortunately most solutions/plugins aren't ideal for what I want.
Anywho, what I was wondering is if it possible to select a value from an array output in JSON format, based on multiple criteria. I am using jQuery
to put it fairly generically (haven't started coding it yet):
<for each cell>
--<find ['number_of_slots'] in JSONarray where ['AppointmentDate'] = "02/02/12" && ['salespoint'] = 1 && ['AppointmentTime] = '10AM'>
--<if no results>
-----<fill cell with 'x'>
--<else>
-----<fill cell with ['number_of_slots']
--<end if>
Or am I better off making an MySQL query for each cell? Just seems to be quite a number of transactions, that's all.
As always, any help and advice is greatly appreciated!
Cheers!