Re: DBD::XML

2016-08-31 Thread Ron Savage

Hi Nigel

On 01/09/16 02:02, Nigel Horne wrote:

Uploaded to https://metacpan.org/release/NHORNE/DBD-XMLSimple-0.01

Now to see what the cpantesters come up with.


The 2nd line of the Synopsis looks like it's meant to be N separate lines.

--
Ron Savage - savage.net.au


how to repersent N:M in DBIx?

2016-08-31 Thread Rajeev Prasad via dbi-users
Pl refer to this link, it has my exact problem (but it only tells about SQL 
solution): 
http://stackoverflow.com/questions/11409869/mysql-nm-relationship-find-rows-with-several-specific-relations
I have three tables:1. products:-> prod-id, prod-name
2. tags:-> tag-id, tag-name
3. product_tags::-> prod-id, csv_tag_id
i read elsewhere on internet that this is not a good database/table design. so 
i am ready to change that too, but i could not think of any other way to 
represent this relationship. a given product could have multiple tags, but i 
have to find - at a given time - only those products which have 'ALL' of 
multiple given tags.
the SQL suggested on the page is:
SELECT a.*
FROM products a
INNER JOIN product_tags b ON a.product_id = b.product_id
WHERE b.tag_id IN (1,23,54)
GROUP BY a.product_id
HAVING COUNT(1) = 3thank you.Rajeev


Re: DBD::XML

2016-08-31 Thread Nigel Horne

Uploaded to https://metacpan.org/release/NHORNE/DBD-XMLSimple-0.01

Now to see what the cpantesters come up with.

-Nigel

--
Nigel Horne
Conductor: Rockville Brass Band, Washington Metropolitan GSO
@nigelhorne | fb/nigel.horne | bandsman.co.uk | concert-bands.co.uk | 
www.nigelhorne.com

Unless it's for my eyes only, please use "reply all"




smime.p7s
Description: S/MIME Cryptographic Signature