<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1014024" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1014024</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/help-making-table-php#comment-1081206</link>
    <description> &lt;p&gt;BTW, welcome to TWF!&lt;/p&gt;
 </description>
     <pubDate>Tue, 17 Apr 2001 04:06:18 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1081206 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/help-making-table-php#comment-1081075</link>
    <description> &lt;p&gt;&lt;em&gt;userID being the Primary key&lt;/em&gt;&lt;br /&gt;
I would recommend agains this. I always use ID as the primary key, and I never make a table withouth ID.&lt;/p&gt;
&lt;p&gt;To check to see if something exists, and create if not, you will need two queries.&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;$query = &amp;quot;SELECT * FROM table_name WHERE field_name=value&amp;quot;;&lt;br /&gt;$result = mysql_query($query);&lt;br /&gt;if (!$result) {&lt;br /&gt;&amp;nbsp; $query = &amp;quot;INSERT INTO table_name (field_names) VALUES(values)&amp;quot;;&lt;br /&gt;&amp;nbsp; mysql_query($query)&lt;br /&gt;}&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;No, IP would not make a good UNIQUE field.  I am behind a router... the internet only see&#039;s 1 IP, but there are actually 3 PCs on the network, all online. Again, I would advise using ID as a UNIQUE field.&lt;/p&gt;
 </description>
     <pubDate>Sun, 15 Apr 2001 04:29:52 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1081075 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
