<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1017310" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1017310</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/table-table#comment-1101293</link>
    <description> &lt;p&gt;Okay here is my query:&lt;/p&gt;
&lt;p&gt;SELECT title,email,realname,date,article FROM members,articles WHERE members.username = articles.username&lt;/p&gt;
&lt;p&gt;it doesn&#039;t get the information from the members table still.&lt;/p&gt;
&lt;p&gt;Date&lt;br /&gt;
Title&lt;br /&gt;
Article&lt;/p&gt;
&lt;p&gt;are all in the articles table and these are retrieved.&lt;/p&gt;
&lt;p&gt;The realname and email are in the members table and are not retrieved.&lt;/p&gt;
&lt;p&gt;Can anyone help me?&lt;/p&gt;
 </description>
     <pubDate>Tue, 12 Feb 2002 16:56:38 +0000</pubDate>
 <dc:creator>a_gajic</dc:creator>
 <guid isPermaLink="false">comment 1101293 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/table-table#comment-1101122</link>
    <description> &lt;p&gt;I will try it out later as I am going out shortly, but thanks anyway. That makes much more sense to me than the manual did lol..&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
 </description>
     <pubDate>Mon, 11 Feb 2002 10:59:07 +0000</pubDate>
 <dc:creator>a_gajic</dc:creator>
 <guid isPermaLink="false">comment 1101122 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/table-table#comment-1101068</link>
    <description> &lt;p&gt;a mysql book or tutorial could explain it much better than i can, but ill give it a shot.&lt;/p&gt;
&lt;p&gt;your members table should have a primary key, an auto_incremented integer.  you could use names or letters or something, but then you have to worry about duplicates.  such a column definition would look like so (in mysql):&lt;/p&gt;
&lt;p&gt;userid integer unsigned not null primary key auto_increment&lt;/p&gt;
&lt;p&gt;now every record you add to your members table will be assigned a userid or member number automatically.&lt;/p&gt;
&lt;p&gt;then, you have an &#039;articles&#039; table.  your articles table needs a userid column too, but this one should just be a plain old unsigned integer:&lt;/p&gt;
&lt;p&gt;userid integer unsigned not null&lt;/p&gt;
&lt;p&gt;your article table should have a primary key also, such as articleid. every time you insert a record into the articles table enter the userid of the author also.&lt;/p&gt;
&lt;p&gt;Now, lets say your tables look like this:&lt;br /&gt;
MEMBERS&lt;br /&gt;
userid&lt;br /&gt;
username&lt;br /&gt;
password&lt;br /&gt;
email&lt;br /&gt;
location&lt;/p&gt;
&lt;p&gt;ARTICLES&lt;br /&gt;
articleid&lt;br /&gt;
userid&lt;br /&gt;
date&lt;br /&gt;
title&lt;br /&gt;
content&lt;/p&gt;
&lt;p&gt;now, to select all info pertaining to, say, article 56:&lt;/p&gt;
&lt;p&gt;SELECT * FROM users,articles WHERE articleid=56 AND users.userid=articles.articleid&lt;/p&gt;
&lt;p&gt;well, that may or may not make sense, i just typed it as it came to mind.  a mysql tutorial will explain it much better.&lt;/p&gt;
 </description>
     <pubDate>Mon, 11 Feb 2002 02:56:05 +0000</pubDate>
 <dc:creator>ROB</dc:creator>
 <guid isPermaLink="false">comment 1101068 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/table-table#comment-1101060</link>
    <description> &lt;p&gt;Well that didn&#039;t work, how do you do the table link thing? My tables have id&#039;s in both of them.. can you explain a little more on how to do it please because I&#039;ve never had to do it before&lt;/p&gt;
 </description>
     <pubDate>Mon, 11 Feb 2002 01:06:33 +0000</pubDate>
 <dc:creator>a_gajic</dc:creator>
 <guid isPermaLink="false">comment 1101060 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/table-table#comment-1101046</link>
    <description> &lt;p&gt;this deafeats one of the most significant purposes of using a database (not repeating data).  your members table should have an id field, such as &#039;memberid&#039;.  your articles table should also have a &#039;memberid&#039; or &#039;authorid&#039; column.  the memberid of records in the articles column would then correspond with the memberid of their authors (in the members table).&lt;/p&gt;
&lt;p&gt;although, if you insist on doing it the wrong way, try this:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;$query &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;SELECT * FROM members WHERE (username=&#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$uid&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;)\&quot;;&lt;br /&gt;&lt;br /&gt;while(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$result&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=mysql_fetch_array(mysql_query(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$query&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;))) break;&lt;br /&gt;&lt;br /&gt;if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$ac&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; == \&quot;submit\&quot;)&amp;nbsp; {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mysql_query(\&quot;INSERT INTO articles VALUES (null,&#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$result&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;realname&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;,&#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$result&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;email&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;,&#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$article&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;,&#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$title&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;,&#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$des&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;,null);\&quot;);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo \&quot;&amp;lt;p&amp;gt;Thank you for submitting your article to the database!&amp;lt;/p&amp;gt;\n\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo \&quot;&amp;lt;p&amp;gt;&amp;lt;a href=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;article_view&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;php3&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&amp;gt;RETURN&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;\n\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; include(\&quot;include/footer.inc\&quot;);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Sun, 10 Feb 2002 22:37:51 +0000</pubDate>
 <dc:creator>ROB</dc:creator>
 <guid isPermaLink="false">comment 1101046 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
