<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1020334" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1020334</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/joining-db-tables#comment-1124774</link>
    <description> &lt;p&gt;update:&lt;br /&gt;
Well it seems I no longer have this problem as I no longer have the files &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/sad.png&quot; title=&quot;Sad&quot; alt=&quot;Sad&quot; class=&quot;smiley-content&quot; /&gt; I was uploading and backing up (to zip disk) when the good old blue screen got me (Thanks MS). so I ended up loosing it all.&lt;br /&gt;
Thanks for all the help.&lt;br /&gt;
Back to the drawing board &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/sad.png&quot; title=&quot;Sad&quot; alt=&quot;Sad&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 03 Feb 2003 20:14:21 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1124774 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/joining-db-tables#comment-1124519</link>
    <description> &lt;p&gt;so much for simple lol&lt;br /&gt;
I&#039;ll try get a working copy of it uploaded so you can check it out, you might be able to see an easier way.&lt;/p&gt;
 </description>
     <pubDate>Thu, 30 Jan 2003 09:07:57 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1124519 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/joining-db-tables#comment-1124509</link>
    <description> &lt;p&gt;Then you might have to exec 3 queries, and populate an array.  You can then do array_unique() to remove duplicates and sort() to arrange your results.&lt;/p&gt;
 </description>
     <pubDate>Thu, 30 Jan 2003 07:04:56 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1124509 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/joining-db-tables#comment-1124501</link>
    <description> &lt;p&gt;db1, db2, and db3 do have a common field but it&#039;s not being used in the SELECT statement as the contents are being matched not the id&#039;s&lt;br /&gt;
If I do it by matching id&#039;s I get random results - not the ones I want and if i try do two queries I can&#039;t match (display) them with the right results. the above works, just doubles (repeats) the ouput&lt;/p&gt;
 </description>
     <pubDate>Thu, 30 Jan 2003 03:32:51 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1124501 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/joining-db-tables#comment-1124471</link>
    <description> &lt;p&gt;Do db1, db2, and db3 have any common field?  If not, then you shouldn&#039;t be retrieving info fromt them all in one query.&lt;/p&gt;
&lt;p&gt;By doing a &quot;FROM db1&lt;strong&gt;,&lt;/strong&gt;db2&quot; the comma is a INNER JOIN, but your not specifying how they are joined.&lt;/p&gt;
&lt;p&gt;mySQL Docs:&lt;br /&gt;
&lt;a href=&quot;http://www.mysql.com/doc/en/JOIN.html&quot; class=&quot;bb-url&quot;&gt;6.4.1.1 JOIN Syntax&lt;/a&gt;&lt;/p&gt;
&lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;Quote: INNER JOIN and , (comma) are semantically equivalent. Both do a full join between the tables used. Normally, you specify how the tables should be linked in the WHERE condition. &lt;/p&gt;&lt;/blockquote&gt;
 </description>
     <pubDate>Wed, 29 Jan 2003 20:51:38 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1124471 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/joining-db-tables#comment-1124468</link>
    <description> &lt;p&gt;I was playing around with it on paper last night and think the culprit is the &#039;and&#039;&lt;br /&gt;
SELECT * FROM db1,db2 WHERE db1.sub1 LIKE &#039;%apple%&#039; &lt;strong&gt;and&lt;/strong&gt; db1.sub2 LIKE &#039;%food%&#039; ORDER BY db2.sub3 LIMIT 0,10 &lt;/p&gt;
&lt;p&gt;Can I change the &#039;and&#039; to anything else like a &#039;where&#039; or &#039;=&#039; even&lt;/p&gt;
 </description>
     <pubDate>Wed, 29 Jan 2003 20:23:14 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1124468 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/joining-db-tables#comment-1124447</link>
    <description> &lt;p&gt;Tried it but gave sql error after ON&lt;br /&gt;
I think the reason it&#039;s not working is because I&#039;m not actually using the id&#039;s of any of the tables, it&#039;s all being done by the other sections.&lt;br /&gt;
I&#039;m not on my pc at the moment so can&#039;t get the code&lt;br /&gt;
I think it could be my setup as now I&#039;m having trouble with &#039;%stuff%&#039; and &#039;stuff&#039; not working properly in search terms.&lt;/p&gt;
 </description>
     <pubDate>Wed, 29 Jan 2003 09:10:51 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1124447 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/joining-db-tables#comment-1124431</link>
    <description> &lt;p&gt;Thanks I&#039;ll try that tonight, It&#039;s not a simple case of cut and paste as it&#039;s all if else statements controling the db** and sub** calls (it&#039;s an advanced search option - well for me anyways &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/big.png&quot; title=&quot;Laughing out loud&quot; alt=&quot;Laughing out loud&quot; class=&quot;smiley-content&quot; /&gt; )&lt;/p&gt;
 </description>
     <pubDate>Wed, 29 Jan 2003 03:23:58 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1124431 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/joining-db-tables#comment-1124411</link>
    <description> &lt;p&gt;something like this&lt;/p&gt;
&lt;p&gt;SELECT * FROM db1 JOIN db2 ON db2.sub21=db1.sub11 WHERE db1.sub1 LIKE &#039;%apple%&#039; and db1.sub2 LIKE &#039;%food%&#039; ORDER BY db2.sub3 LIMIT 0,10&lt;/p&gt;
 </description>
     <pubDate>Tue, 28 Jan 2003 22:20:22 +0000</pubDate>
 <dc:creator>ROB</dc:creator>
 <guid isPermaLink="false">comment 1124411 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/joining-db-tables#comment-1124398</link>
    <description> &lt;p&gt;A mess &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;There are 3 tables with 2 of them having 4 columns each and one having 5 columns.&lt;br /&gt;
I just used the db1, sub1 etc above to make the lines shorter in the example, so using the same method&lt;/p&gt;
&lt;p&gt;db1&lt;br /&gt;
-sub11 (id)&lt;br /&gt;
-sub12&lt;br /&gt;
-sub13&lt;br /&gt;
-sub14&lt;/p&gt;
&lt;p&gt;db2&lt;br /&gt;
-sub21 (id)&lt;br /&gt;
-sub22&lt;br /&gt;
-sub23&lt;br /&gt;
-sub24&lt;/p&gt;
&lt;p&gt;db3&lt;br /&gt;
-sub31 (id)&lt;br /&gt;
-sub32&lt;br /&gt;
-sub33&lt;br /&gt;
-sub34&lt;br /&gt;
-sub35&lt;/p&gt;
&lt;p&gt;If you want the proper names I&#039;ll have to do a db dump, but can&#039;t at the moment as I have an annoying CMOS error that pops up when I try open anything&lt;/p&gt;
 </description>
     <pubDate>Tue, 28 Jan 2003 20:29:06 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1124398 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
