Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #8985
| From | bill <william@TechServSys.com> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: comparing arrays |
| Date | 2013-04-07 10:00 -0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <kjru58$19d$1@speranza.aioe.org> (permalink) |
| References | <kjrlk6$8es$1@speranza.aioe.org> <kjrp0m$ote$1@dont-email.me> |
On 4/7/2013 8:34 AM, Jerry Stuckle wrote: > On 4/7/2013 7:34 AM, bill wrote: >> I need to see if a patient has appointments with a >> psychotherapist and a >> physician on the same day. >> >> I request the schedule of each therapist and each physician as >> arrays of >> arrays: >> time, patient_number, duration (note, the therapist/physician >> id is not >> in the array) >> They are non-associative arrays (numeric keys) >> I might have 1..n physicians and 1..n therapists >> I can generate arrays of physicians and arrays of therapists >> >> Option 1 is a nightmare of nested foreachs >> >> I am sure there must be an array function that will permit this >> check. >> AFAIK, the _intersect functions require the same date in all, >> when what >> I want is "any". >> >> my current thought is to create arrays of just pt_number, merge >> the >> physician arrays, merge the therapist arrays, array_flip to >> move the >> values to keys and then array_intersect. >> >> But, before I try that I welcome any suggestions. >> >> bill > > Does the information come from a SQL database? If so, I'd do it > in SQL. > Yes it does, 3 tables: users (therapist/physician), pt_info, schedule. A little more of a hint please. bill
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
comparing arrays bill <william@TechServSys.com> - 2013-04-07 07:34 -0400
Re: comparing arrays Jerry Stuckle <jstucklex@attglobal.net> - 2013-04-07 08:34 -0400
Re: comparing arrays bill <william@TechServSys.com> - 2013-04-07 10:00 -0400
Re: comparing arrays Frank Steinmetzger <frank.steinmetzger@stud.tu-ilmenau.de> - 2013-04-07 16:14 +0200
Re: comparing arrays Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-04-07 17:13 +0200
Re: comparing arrays bill <william@TechServSys.com> - 2013-04-07 11:34 -0400
Re: comparing arrays Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-04-07 21:33 +0200
Re: comparing arrays The Natural Philosopher <tnp@invalid.invalid> - 2013-04-07 16:01 +0100
Re: comparing arrays Frank Steinmetzger <frank.steinmetzger@stud.tu-ilmenau.de> - 2013-04-07 20:22 +0200
Re: comparing arrays Jerry Stuckle <jstucklex@attglobal.net> - 2013-04-07 14:18 -0400
Re: comparing arrays Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-04-07 15:37 +0200
Re: comparing arrays bill <william@TechServSys.com> - 2013-04-07 09:59 -0400
Re: comparing arrays Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-04-07 17:14 +0200
Re: comparing arrays The Natural Philosopher <tnp@invalid.invalid> - 2013-04-07 15:59 +0100
csiph-web