Matches in a database.

Matthew Walker matt at
Tue Jun 28 11:34:15 MDT 2005

On Tue, 2005-06-28 at 11:20 -0600, C. Ed Felt wrote:
> So, in short, (since a paragraph will get confusing):
> 1.  SELECT all records in the CDR table after a requested date (usually 
> 24 hours).
> 2.  Store these records in a huge array.
> 3.  Find all repeats on the 'sessid' field and store this in an array.
> 4.  Delete all repeats (save one copy of each repeat CDR).
> Is there a MySQL query, (version 3), to select all rows that have one or 
> more matching rows on a specific field ('sessid')?  This would 
> essentially combine steps 1, 2 and 3 in one MySQL query.

I don't believe this is doable in a single query until MySQL 5.
You /might/ be able to do it in 4.1, but I'm not sure.

Matthew Walker
The Brain Garden, Inc
matt at
Work: (801) 655-1075
Home: (801) 491-2079
Page: (801) 283-9887 (Emergencies Only)

Random Quote:
The Official MBA Handbook on business cards:
Avoid overly pretentious job titles such as "Lord of the Realm,
Defender of the Faith, Emperor of India" or "Director of Corporate
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : 

More information about the PLUG mailing list