<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1021163" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1021163</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/simple-sql-help#comment-1130473</link>
    <description> &lt;p&gt;Thank you very much SQLGuru!&lt;/p&gt;
&lt;p&gt;Mike&lt;/p&gt;
 </description>
     <pubDate>Thu, 01 May 2003 21:53:47 +0000</pubDate>
 <dc:creator>mycoolross</dc:creator>
 <guid isPermaLink="false">comment 1130473 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/simple-sql-help#comment-1130459</link>
    <description> &lt;p&gt;I need to select t1.field1, t1.field2. t1.field3,&lt;br /&gt;
even if t2.field1 = t1.field2 does not match&lt;br /&gt;
how can I do this?&lt;/p&gt;
&lt;p&gt;I need t2.field1 only of it matches it needs to be optional.&lt;/p&gt;
&lt;p&gt;select t1.field1, t1.field2. t1.field3,&lt;br /&gt;
t2.field1 from table1 t1, table2 t2&lt;br /&gt;
where t1.field=1&lt;br /&gt;
and t2.field1 = t1.field2&lt;/p&gt;
&lt;p&gt;You need at least one field between the two related tables to be a relationship.  &lt;/p&gt;
&lt;p&gt;If what i think you are trying to do, is a left join.  This works in sql server, not sure about mysql:&lt;/p&gt;
&lt;p&gt;select t1.field1, t1.field2. t1.field3,&lt;br /&gt;
t2.field1 from table1 t1&lt;br /&gt;
left join table2 t2 on&lt;br /&gt;
t1.field2=t2.field1&lt;br /&gt;
where t1.field=1&lt;/p&gt;
&lt;p&gt;What you will get is all records from table one, and all matching records from table2.  However, you will get NULL fields in t2.field1 where no match occurred on the join expression.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.mysql.com/doc/en/JOIN.html&quot; class=&quot;bb-url&quot;&gt;http://www.mysql.com/doc/en/JOIN.html&lt;/a&gt;&lt;/p&gt;
 </description>
     <pubDate>Thu, 01 May 2003 20:09:24 +0000</pubDate>
 <dc:creator>SqlGuru</dc:creator>
 <guid isPermaLink="false">comment 1130459 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
