I have a category id and now I want to get the list of products which have the same category id.   How to do it?
120801
I couldn't find the right way to get the list of all products for a given category ID (not category name).  The code I am using to get the categories list is the following, it works fine:  $args = array(            'orderby'    =&gt; $orderby,            'order'      =&gt; $order,            'hide_empty' =&gt; 0,            'include'    =&gt; $ids,            'parent'    =&gt; 0,      );   $categories = get_terms( 'product_cat', $args );   However, now for a given category ID (say 47), I couldn't find the way to get its relevant products. I tried the following way:  $args = array(      'posts_per_page' =&gt; 5,     'offset'=&gt; 1,     'category' =&gt; 47  );  $products = get_posts( $args ); echo var_dump($products);   Debugging the $products array returns always 0 which is wrong since I know there is some products under the category with ID 47. Any ideas how to fix my code?
116534
I have different categories called as reviews, ideas etc. I have a page called as review, I want to display review category to the review page (only review category). Is this possible? Which file I have to change? I have the code below, but it is displaying only the texts not any links to the posts, 7 is my category id.  if( is_page( 'reviews' )){           query_posts("cat=7" );        }
69047
How can I query the  for tags I've created?
51941
I am wondering how to differentiate all these different joins ...
109703
How do I get a collection of the tags I've marked as favorites?  When I hover over a tag, and click the star icon, it toggles between Favorite, Normal and Ignored. How do I find that information using the data explorer?  If not possible, I would like to add such functionality please.  Example: On the web UI, I can go to the 'unanswered questions', then select 'my tags'. I want to filter and sort that list of questions.
28961
Table #01 Status:  StatusID    Status -----------------------  1          Opened  2          Closed  3          ReOpened  4          Pending   Table #02 Claims:  ClaimID     CompanyName StatusID -------------------------------------- 1               ABC     1 2               ABC     1 3               ABC     2 4               ABC     4 5               XYZ     1 6               XYZ     1   Expected Result:  CompanyName TotalOpenClaims TotalClosedClaims TotalReOpenedClaims TotalPendingClaims -------------------------------------------------------------------------------- ABC                 2           1                      0               1 XYZ                 2           0                      0               0   How do I need to write the query so that I could get the result as expected?
101457
When I want to close a question as duplicate using the app, I have to enter the question ID as usual. Problem is, as far as I can tell, the question IDs are shown nowhere! Please add the ID somewhere.
9564
I am looking to return a list of users from a database. There are hundreds of users in the db. Each user has it's own unique user_id. All of the values that I am trying to return reside in the same column (meta_value).   The database structure is as follows:  id | user_id | meta_key | meta_value   sample data is as follows:   1 | 3434 | first_name | Brandon 2 | 3434 | last_name  | Johnson 3 | 3434 | street_add | 123 main 4 | 3434 | city       | ocean beach 5 | 3434 | state      | Texas   I am trying to return the first name, last name, street_add, city, and state in one sql statement.  I'd like the output to look like:  Brandon, Johnson, 123 Main, Ocean Beach, Texas
4474
Assume I have the following list:  foo = ['a', 'b', 'c', 'd', 'e']   What is the simplest way to retrieve an item at random from this list?
58142
I have a database table that contains a list of contacts, some of those contacts might have multiple records, e.g.  CustomerID, CustomerName, Vehicle 1, Dan, Mazda 1, Dan, Suzuki 2, John, Ford 3, Dasha, Volvo 3, Dasha, Ford   Can I write a select query to return the distinct customerID and CustomerName, and a list of vehicles in 1 record? i.e.  1, Dan, Mazda+Suzuki 2, John, Ford 3, Dasha, Volvo+Ford   Thanks
114471
I am looking for a way to show posts that belongs to a specific category or if they have a custom field. If I specify both parameter 'cat' =&gt; '9' and 'meta_key' =&gt; 'featured' in query arguments then WP_Query returns posts which satisfy both conditions simultaneously.  That I do not want. What I need is to show posts if they have category 9 or if they have custom field featured.  Let me know if it does not make sense. I will post an example to explain.
79614
i have a multiple meta (custom field) in posts as "cd_meta" that it (cd_meta) have a meta as "artist", also "artist" meta maybe have one or more value in array  i want to getting posts that "artist" meta have specific value and number of them  look below picture for more info
51398
I remember seeing somewhere that IDs are composed of a few pieces. I always have a hard time trying to find that information when I'm looking for it. What I mean by the above is that the various places in the ID represent different things - for example the first few characters represent what type of sObject it is.
24862
I have a list that contains folders.   Using c# and object model, how can I see if the folder contains any items, or return a collection of all the items in that folder.
44302
I have a data extension with a CustomerId(PK) that has multiple Productid's as Productid1, ProductId2, ProductId3...ProductId10.   Some of the Productid's are empty for some Customers and I'm trying to write some AMPscript if the productIdx is empty to show the next one.  I'm trying to display 6 products in an email and at the moment when I preview the email, if from the first six Products one doesn't have a value(is empty) I get the error "The subscriber preview failed to generate. Review the details, correct all issues, and try again. Product1 not found"  I want to skip the product that is NULL and go to the next one available.  %%[ SET @customerId = [customerId]  SET @customer_rows = LookupRows("PRL","customerId",@customerId) IF Rowcount(@customer_rows) &gt; 0 THEN SET @customer_row = ROW(@customer_rows, 1)  SET @product_count = 0  SET @productId1 = FIELD(@customer_row, "productId1")  IF NOT EMPTY(@productId1) THEN SET @product_rows = LookupOrderedRows("PI_UK", 1,"Normal_SalePrice Desc", "ProductCode", @productId1)  IF RowCount(@product_rows) &gt; 0 THEN  SET @product_count = ADD(@product_count,1) ELSE  SET @product_count = ADD(@product_count,0) ENDIF ELSE SET @product_count = ADD(@product_count,0) ENDIF    SET @productId2 = FIELD(@customer_row, "productId2") IF NOT EMPTY(@productId2) THEN SET @product_rows = LookupOrderedRows("PI_UK", 1,"Normal_SalePrice Desc", "ProductCode", @productId2) IF RowCount(@product_rows) &gt; 0 THEN SET @product_count = ADD(@product_count,1) ELSE SET @product_count = ADD(@product_count,0) ENDIF ELSE SET @product_count = ADD(@product_count,0) ENDIF  SET @productId3 = FIELD(@customer_row, "productId3") IF NOT EMPTY(@productId3) THEN SET @product_rows = LookupOrderedRows("PI_UK", 1,"Normal_SalePrice Desc", "ProductCode", @productId3) IF RowCount(@product_rows) &gt; 0 THEN SET @product_count = ADD(@product_count,1) ELSE SET @product_count = ADD(@product_count,0) ENDIF ELSE SET @product_count = ADD(@product_count,0) ENDIF  and so on till ProducId10...   I have uploaded a photo with the PRL Data extension
42749
If i run below query it returns all records of that object:  Select ID, name from Contact where Name like '%%%'   This should return only those records which have % in the name. For example if i run below query it will return only those records which have test in the name.  Select ID, name from Contact where Name like '%test%'   Any idea, What is going on here?
99280
I put together a sample scenario of my issue and I hope its enough for someone to point me in the right direction.  I have two tables  Products    Product Meta    I need a result set of the following