LOL. It's a learning crucible.
Here's what I'm doing.
My client wants to upload a list of zip codes, match them
against a master
list, and calculate % coverage (i.e., overlap) between the
two.
I'm uploading the list by having them paste the zipcode list
copied from an
excel file into a textarea field. This works great.
Then I'm doing the following -
1. Writing that list into a newly created table.
2. Selecting distinct from that table into a temporary
holding table.
3. Truncating the newly created table
4. Selecting from the temporary table into the truncated
table (now
de-duped)
5. Dropping the temporary table
6. Then I will SELECT myfield FROM mytable WHERE myfield NOT
IN (SELECT
myfield FROM mastertable)
This will tell me how many of the uploaded zips were not
present in the
master table, and from that information I can calculate the %
overlap.
Make sense? Or do you see an even better way?
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"David Powers" <david@example.com> wrote in message
news:efglmo$fla$1@forums.macromedia.com...
> Murray *ACE* wrote:
>> $mysql="CREATE TABLE tblTemp (tempZip CHAR(5) NOT
NULL)";
>> mysql_query($mysql, $selectData) or
die(mysql_error());
>
> This is creating a new table, so it will be able to run
only once.
>
> I've no idea what you're trying to do, but it seems as
though you're tying
> yourself in great knots.
>
> --
> David Powers
> Adobe Community Expert
> Author, "Foundation PHP for Dreamweaver 8" (friends of
ED)
>
http://foundationphp.com/