php - A query or code solution for getting all rows where a column matches (x AND y AND z) -
Actually, we know that SQL has used these to change many or circumstances (X or Y or J) goes. But in this case I need a code solution to select a query, or all the rows (x and y and z). Something like this is experimenting. On your site, while searching for vehicles, more features give you fewer results, so they are not clearly using IN in their queries, a in fact will be a simplified version of my database .
Advertisement table:
------------ - | ID | Title | -------------- Features table:
------------ --- | ID | F_name | --------------- Advertising Feature Table:
----------- -------------------- | ID | advert_id | Feature_id | ------------------------------- Search filter for features I have an editor Join the left side of the FEATURES table and apply the following WHERE clause:
WHERE feature_id IN (x, y, z) None of the selected features but as I said, I need a query or code solution that only receives ads on not all but not necessarily Selected attributes a user The surveyor can choose from any of the facilities in any number of about 40 facilities. Where would it be "AND", which I already have a lot of.
How can I go about doing this? It is not SQL, it can be a code solution.
This is an example of a "set-in-set" query I used to collect and use these < I want to solve the code> the section. In your case, you can do this: advertsFeatures, select advert_id, wherein count = (*) = 3 in adver_text_id (x, y, z) in the feature_id; Note that you need to convert 3 to the number of items in the these list. It also assumes that there is no duplicate in AdvertsFeatures data (otherwise, you use the count (specific feature) in the ones section).
Comments
Post a Comment