-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, all --

...and then David T-G said...
% 
% I'm so far about knee-deep in my project where I'll be using php to talk
% to the mysql database and spit out my web pages.  I wonder if I should be
% making individual calls to the database or loading a table into an array
% so that I can walk it without those calls.

A little RTFMing later, after some helpful pointers, our hero returns.
Gee, look what a complex join can do for me:

  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)

All of what I want in one single call :-)  I'll probably have to refine
this a bit as I learn more about how to use it, but I'm on my way.


Thanks again & HAND & HNY

mysql query,
:-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!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE+Ef15Gb7uCXufRwARAiumAKCeJaDVTj2lULSiguWUhueZ33nQAQCgm8df
MY7UobhF+klun/sBa9RF4jY=
=6NDi
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to