mysql select where count = 0 -


In my DB, I have a "sales" table and a "sale_itum". Sometimes, something goes wrong And the sales are recorded, but there are no sales items.
That's why I'm trying to get sales from my table "sales", which has no row in the sales_ item table.

This is mysql query that I thought would work, but this is not:

  SELECT s * Natural sales of sales by sales_item si WHERE like s.date '' ((Isset ($ _GET ['Date'])) $ _GET ['Date']: Date ("YMD")). "% 'And s.sales_id" ". ((Azette ($ _ GET [' shop '])? $ _GET [' store ']: substream ($ _kuki [' shop '], 0, 3) "% 'Hogging count (CIS_s_ITM_ID) = 0;  

Any ideas?

The table comes from the surname V Where does it come from? Table definition showing would be a great idea;)

This should include a left:

 < Code> SELECT SELECT1 Table 1 LEFT JOIN table2 ON (table1.id = Table2.table1_id) Table 2 WTA 1_ID IS Null  

Table 1 Your sale Lika and Table 2 have Vikry_aitm


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -