MySQL Forums
Forum List  »  PHP

Re: Too many results in my Query
Posted by: Peter Brawley
Date: November 09, 2012 03:28PM

> some results do not contain that key word but show up anyway.

For us to discern the reason, you'd have to post enough data to reproduce the problem. Meanwhile the query has obvious problems ...

1. Are you aware that ...LEFT JOIN process ... LEFT JOIN summary ... WHERE summary.<colname> LIKE ... turns those LEFT JOINs into INNER JOINs?

2. The need to search seven summary columns for one keyword value strongly suggests the summary table needs further normalisation, eg to ...

summary(sid PK, processid references process...)
summarylabels(labelid PK, label varchar(64)
summaryitems( itemid PK, sid references summary(sid), label reference summarylabels(label), description ...)



Edited 1 time(s). Last edit at 11/12/2012 08:53AM by Peter Brawley.

Options: ReplyQuote


Subject
Written By
Posted
November 09, 2012 02:09PM
Re: Too many results in my Query
November 09, 2012 03:28PM
November 12, 2012 12:45AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.