First off I apologize for the extremely vague title, not too sure how to describe what I'm up against in a short phrase.
I have a series of 3 queries I need to display entry data within a category and assigned to one client.
For the most part I've successfully established the first 2 queries with one issue. I need to call all entries with a t.status = 'open' and t.status = 'featured' but I'm not too sure how to.
I've tried AND/OR but this has not worked. Any advice?
Code MySQL:*********************************************** All Entries for one Client *********************************************** SELECT t.title , t.url_title , (SELECT field_id_24 FROM exp_weblog_data WHERE entry_id = "5") as Client // 5 is the value of a dynamic variable FROM exp_weblog_titles AS t LEFT JOIN exp_weblog_data AS d ON t.entry_id = d.entry_id AND t.status = 'open' LEFT JOIN exp_relationships as r ON d.entry_id = r.rel_parent_id WHERE r.rel_child_id = '5' // 5 is the value of a dynamic variable ORDER BY t.entry_date DESCMy trouble is with this last query. I need to show a list of all Clients who haveCode MySQL:*********************************************** All Entries for one Client within selected category *********************************************** SELECT t.title , t.url_title , c.cat_url_title , (SELECT field_id_24 FROM exp_weblog_data WHERE entry_id = "5") as Client // 5 is the value of a dynamic variable FROM exp_categories AS c INNER JOIN exp_category_posts AS cp ON cp.cat_id = c.cat_id AND c.cat_url_title = 'corporate_video' // corporate_video is the value of a variable INNER JOIN exp_weblog_titles AS t ON t.entry_id = cp.entry_id AND t.status = 'open' LEFT JOIN exp_weblog_data AS d ON t.entry_id = d.entry_id LEFT JOIN exp_relationships as r ON d.entry_id = r.rel_parent_id WHERE r.rel_child_id = '5' // 5 is the value of a dynamic variable ORDER BY t.entry_date DESC
projects within one category but I only want to list the client name once.
The difficulty is with how the "Client information" is stored within the CMS DB.
I'm dealing with the systems architecture which allows me to create relationships between entries which enables me to pull in data from another entry. These relationships are defined in their own table but the data is stores in different tables.





Bookmarks