Tularis, et al --

...and then David T-G said...
% 
% ...and then Tularis said...
% % 
% % Usually,
% % using mysql to handle your tables is *way* faster than letting php 
% % handle it.
...
% % 
% % In your case, you could just do a complex join I think. That would give 
% 
% Ahhh...  A new term.  Back to the books for me!

A little RTFMing later, our hero returns...


% 
% % all results in one table, and you could just order that on scheduletime, 
% 
% That certainly would be lovely :-)

Look at that; I get out what I want in the order I'll want it in a single
query!

  mysql> select substring(s.timeslot,1,13),i.fname,concat(c.fname,'
  ',c.lname) from personnel as i, clients as c, schedule as s where i.id
  = s.instr and c.id = s.client and i.fname = 'penelope' order by timeslot;
  +----------------------------+----------+-----------------------------+
  | substring(s.timeslot,1,13) | fname    | concat(c.fname,' ',c.lname) |
  +----------------------------+----------+-----------------------------+
  | 2002-12-27 06              | penelope | david t-g                   |
  | 2002-12-27 07              | penelope | david t-g                   |
  | 2002-12-27 08              | penelope | laura t-g                   |
  | 2002-12-27 10              | penelope | david t-g                   |
  +----------------------------+----------+-----------------------------+
  4 rows in set (0.00 sec)

I'll probably have to refine this a bit as I also learn more about how to
use this, but I'm well on my way..


Thanks again & HAND & HNY

:-D
-- 
David T-G                      * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/      Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

Attachment: msg91137/pgp00000.pgp
Description: PGP signature

Reply via email to