Hello to everyone,
I need a little help with php/mysql since i'm new on this.
I have a table named countries that have fields countryID, countryName, countryCode, countryActive and countryUrl;
another table named category that have fields categoryID, categoryName, categoryActive and category Url
and the next table named offers that have field offerID, offerCountry (that is some data got from countries table), offerCategory (that is some data got from category table), offerName, offerTxt, etc
What i want to do is to join those 3 tables and use informations of eachother, something like this:
SELECT B.*,
A.offerID AS offerID,
A.offerName AS offerName,
A.offerCountry AS offerCountry,
A.offercategory AS offerCategory
FROM offers A LEFT JOIN countries B ON
A.offerCountry = B.countryID
WHERE B.countryID = offerCountry ...";
I have used something like this in an other application but it joins only to tables and i was a little confused on examples that i found on the internet, for this i chose to post a new thread out here.
I need this kind of combination bcz, i want to made a kind of sort of offers depending on countries or categories
Can someone help me on this, please?
Thank you in advance!