Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your Query is F*ed up.. You have <code>GROUP BY cl.advertiser_id</code> but also <code>ORDER BY cl.timestamp</code> DESC timestamp is not in the <code>Group BY</code> This shouldn't be allowed!</p> <p>Why do you have a <code>Group BY</code> at All!! Take it out. Remove your <code>force index.</code> Then fix your code so it doesn't have any dups, that is not what group by is for.</p> <p>Edit: Try</p> <pre><code>SELECT cl.title, cl.URL, cl.ID AS ad_id, cl.cat_id, cl.price, cl.timestamp cs.name AS cat_name, pix.file_name, area.area_name FROM findix.classifieds cl INNER JOIN findix.classifieds_pix pix ON cl.ID = pix.classified_id INNER JOIN findix.cat_names_sub cs ON cl.cat_id = cs.ID INNER JOIN findix.zip_codes zip ON cl.zip_id = zip.zip_id INNER JOIN findix.area_names area ON zip.area_id = area.id WHERE cl.confirmed = 1 AND cl.price != '' AND cl.country = 'de' ORDER BY cl.timestamp DESC </code></pre> <p>or </p> <pre><code>SELECT cl.advertiser_id,cl.title, cl.URL, cl.ID AS ad_id, cl.cat_id, cl.price, cl.timestamp max(cs.name) AS cat_name, max(pix.file_name) as file_name, max(area.area_name) as area.area_name FROM findix.classifieds cl INNER JOIN findix.classifieds_pix pix ON cl.ID = pix.classified_id INNER JOIN findix.cat_names_sub cs ON cl.cat_id = cs.ID INNER JOIN findix.zip_codes zip ON cl.zip_id = zip.zip_id INNER JOIN findix.area_names area ON zip.area_id = area.id WHERE cl.confirmed = 1 AND cl.price != '' AND cl.country = 'de' Group By cl.advertiser_id,cl.title, cl.URL, cl.ID AS ad_id, cl.cat_id, cl.price, cl.timestamp ORDER BY cl.timestamp DESC </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload