MySQL Forums
Forum List  »  Newbie

Re: MYSQL left joins
Posted by: Gordon Stewart
Date: May 16, 2020 05:44PM

http://irdlinks.kwister.com/test.php

Hi, thanks for replying. The above page has table layout, & sample text / results.


What i want is:-

1) I enter a search term "ACCOUNT" - It looks up the table and searches the CATEGORY field & finds 1 entry with the category field of "ACCOUNT".

2) it sees that the reference number for that entry is "1". So it gives me all records with reference number 1.

I then do my thing & extract all the information Including the other two categories for reference number 1 - "AGENT" and "CLOSED"

a) The Checkcode field is a unique field combination of reference number and category.

b) Apart from the checkcode and category - All the information will be the same for each entry / record.


c) each record may have 1, or multiple categories.

d) Ive only got 1 entry so far with 3 categories, But i expect hundreds of records with different number of categories.


LONG TERM: (after I fix this issue). i'm wanting to do the same thing, but search two categories.

- All records that match category 1 *AND* category 2.


I think after i do this 1 JOIN, I can figure out the second part ..

Options: ReplyQuote


Subject
Written By
Posted
May 16, 2020 03:18AM
May 16, 2020 03:54AM
May 16, 2020 08:36AM
Re: MYSQL left joins
May 16, 2020 05:44PM
May 16, 2020 06:06PM
May 16, 2020 06:16PM
May 16, 2020 06:22PM
May 16, 2020 06:27PM
May 16, 2020 07:12PM
May 16, 2020 07:20PM
May 16, 2020 07:29PM
May 17, 2020 01:11AM
May 17, 2020 08:36AM


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.