Re: Re: loading a db table into a php array from mysql
| From: | David T-G | Date: | Wed, 01 Jan 2003 11:32:17 +0000 |
| Subject: | Re: Re: loading a db table into a php array from mysql | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129839@lists.php.net to get a copy of this message | ||
Rick, et al --
..and then Rick Widmer said...
%
% At 02:57 PM 12/31/02 -0500, David T-G wrote:
% >...and then Tularis said...
% >%
% >% Usually,
% >% using mysql to handle your tables is *way* faster than letting php
% >% handle it.
%
% Yes, do as much as you can in the database. The people who wrote it spent
% a lot of time trying to optimize it.
Yeah :-)
%
% >% 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!
%
% Here is a query from one of my projects...
..
Wow. Some piece of work.
%
% Every field in the Schedule table is a key to another table that has to be
% looked up and translated to something people will understand. Note the two
Exactly my situation (by design; I at least know that I wouldn't want to
store a name string in the schedule again and again and again :-)
% different ways of connecting tables with LEFT JOIN. USING( fieldname )
% connects the table being joined, with the table listed right before it,
% using the same fieldname in both. The ON syntax allows you to use
% differently named fields, and/or a different table.
I still don't get what a left or right or outer or inner join is... I've
read the mysql docs for the syntax and some examples, but this is a place
where I'll need to go to outside tutorials. Do you know of any (on the
web) which will give me the background?
TIA & Thanks for the example & Happy New Year
:-D
--
David T-G * There is too much animal courage in
(play) davidtg@justpickone.org * society and not sufficient moral courage.
(work) davidtgwork@justpickone.org -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur
Pbzzhavpngvbaf Qrprapl Npg!