title: how to query two tables , some items in table 1 do not an association with table2 ?
body: <p>my database schema is below, each id from email table is associated with an id from attachment table, some do not. for example id 1 from email table have attachment(s) from attachments table (3 entries of id 1 for example), while id 2 from email does not have an id2 in  attachments. I tried to query the result using the following, but only attachments field showed. In essence, I want the result to show everything from date x to date y, whether it has an attachment or not. </p>
  
  <pre><code>SELECT CONCAT(email.from_fld , date_fld) AS name, email.body_fld, attachments.attach_fld 
  FROM email 
  INNER JOIN attachments 
  ON email.id = attachments.id
  WHERE date_fld &gt;= "2012-01-01 00:00:00" AND date_fld &lt;= "2013-01-01 23:59:59" ORDER BY date_fld ASC;
  </code></pre>
  
  <p>This is my database Schema </p>
  
  <pre><code>email table
      id      INT
      from_fld    VARCHAR
      to_fld  VARCHAR
      subj_fld    MEDIUMTEXT
      date_fld    DATETIME
      mailbox VARCHAR
      mailto  VARCHAR
      body_fld    LONGTEXT
      numAttach   INT
      attachNames MEDIUMTEXT
      attachText  MEDIUMTEXT
      headings    MEDIUMTEXT
  
  attachments table
      id          INT
      type_fld        VARCHAR
      filename_fld    VARCHAR
      encode_fld  INT
      attach_fld      LONGBLOB
  
  origemail table
      id      INT
      orig_fld    LONGBLOB
  
  tags table
      id          INT
      cat_fld     VARCHAR
      key_fld     VARCHAR
      priority_fld    INT
      notes_fld       MEDIUMTEXT
  </code></pre>