Hi,

> i  actually  need the id's with no row returned as if they
> were  there  (but with default values)... they do not need
> to  be  inserted  into the table, just returned as if they
> were in there.

The  only way I can think of would be to create a table with
all  the  values  (ids)  you need, and then use LEFT JOIN to
retrieve data...

Table: IDS              TABLE: IDSDATA
  id                      id   data   year
   1                       1     2     01
   2                       2     2     01
   3                       6     2     01
   4                       7     2     01
   5                       8     2     01
   6                      11     2     01
   7
   8
   9
  10
  11
  12

Then your query would look like this:

SELECT IDS.ID, IDSDATA.DATA, IDSDATA.YEAR
FROM IDS LEFT JOIN IDSDATA ON IDS.ID = IDSDATA.ID
ORDER BY IDS.ID


Regards,
Sasa



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to