VbzCart/queries/qryTitles Imageless

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search

About

  • Requires:
  1. REDIRECT Template:l/vc/query, cat_images qryImgs_byTitle
  • Used by: VbzAdmin
  • History:
    • 2012-01-10 created for listing of Imageless Titles
    • 2012-03-11 simpler query returns the same results in under 8 seconds (previous version took 10-50 seconds)

SQL

<mysql>CREATE OR REPLACE VIEW qryTitles_Imageless AS SELECT

 t.*

FROM qryTitles_Item_info AS t LEFT JOIN cat_images AS i ON t.ID=i.ID_Title WHERE (i.ID IS NULL) AND (t.cntForSale > 0);</mysql>

old

<mysql>CREATE OR REPLACE VIEW qryTitles_Imageless AS SELECT

 t.*

FROM `qryTitles_Item_info` AS t LEFT JOIN `qryImgs_byTitle` AS i ON t.ID=i.ID_Title WHERE ((i.ID_Title IS NULL) OR (i.cntActive=0)) AND (t.cntForSale > 0);</mysql>