<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1024612" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1024612</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/mysqlinsertid#comment-1150420</link>
    <description> &lt;p&gt;Yes Suzanne, you are right. It looks so complicated to me to understand.&lt;br /&gt;
Any way, thanks again for your help. You are very remarkable in this forum.&lt;/p&gt;
 </description>
     <pubDate>Tue, 27 Apr 2004 06:27:32 +0000</pubDate>
 <dc:creator>AYYASH</dc:creator>
 <guid isPermaLink="false">comment 1150420 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/mysqlinsertid#comment-1150333</link>
    <description> &lt;p&gt;I&#039;m glad you got it sorted out! Dreamweaver has condensed a lot of the code, which is fine, but makes it difficult for human types to read through it easily unless they are very fluent.&lt;/p&gt;
 </description>
     <pubDate>Sun, 25 Apr 2004 16:07:47 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1150333 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/mysqlinsertid#comment-1150325</link>
    <description> &lt;p&gt;Thank you s0da and Suzanne for your help.  &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt; &lt;/p&gt;
&lt;p&gt;I&#039;ve finally solved the problem.  &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>Sun, 25 Apr 2004 10:32:06 +0000</pubDate>
 <dc:creator>AYYASH</dc:creator>
 <guid isPermaLink="false">comment 1150325 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/mysqlinsertid#comment-1150324</link>
    <description> &lt;p&gt;you grab the last ID inserted; then you insert or update it intot he database&lt;/p&gt;
&lt;p&gt;1. insert ...&lt;br /&gt;
2. grab insert id ...&lt;br /&gt;
3. insert/update using insert id ...&lt;/p&gt;
 </description>
     <pubDate>Sun, 25 Apr 2004 08:04:36 +0000</pubDate>
 <dc:creator>s0da</dc:creator>
 <guid isPermaLink="false">comment 1150324 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/mysqlinsertid#comment-1150323</link>
    <description> &lt;p&gt;Well,&lt;/p&gt;
&lt;p&gt;I have master table called &quot;initiation&quot;. The index field called &quot;indexNo&quot; and it&#039;s auto incremented. I want the value of this filed to be inserted automatically to the other index fields for the other four tables (estimate.estimateID, printreq.preqID, printquot.quotID, request.reqID) every time I insert a new record. Later I want to be able to make relations between these tables by using the value that has been inserted.&lt;/p&gt;
&lt;p&gt;In MySQL 5, they solve this problem by adding procedures and triggers. But we have to wait until it&#039;s officially released.&lt;br /&gt;
In the mean while, I have to do it using PHP. I know how to write a good SQL syntax but I can&#039;t integrate it with the PHP code because I&#039;m not good at it. As you can see in the code I posted ubove, this is difficult for me to understand.&lt;/p&gt;
&lt;p&gt;Thanks in advance&lt;/p&gt;
 </description>
     <pubDate>Sun, 25 Apr 2004 08:01:11 +0000</pubDate>
 <dc:creator>AYYASH</dc:creator>
 <guid isPermaLink="false">comment 1150323 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/mysqlinsertid#comment-1150322</link>
    <description> &lt;p&gt;What are your other tables like? I assume that that ID is in them -- you just INSERT your data into those tables with that ID set to the value you get... ? &lt;/p&gt;
&lt;p&gt;Can you provide more explanation of the other tables?&lt;/p&gt;
&lt;p&gt;So... INSERT INTO othertable SET id = &#039;$ID1&#039;, field = &#039;$value&#039;&lt;/p&gt;
&lt;p&gt;Does that make sense?&lt;/p&gt;
 </description>
     <pubDate>Sun, 25 Apr 2004 07:17:56 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1150322 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/mysqlinsertid#comment-1150321</link>
    <description> &lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;But how can I use &quot;$Id1&quot; to insert its value into other tables?&lt;/p&gt;
 </description>
     <pubDate>Sun, 25 Apr 2004 06:57:52 +0000</pubDate>
 <dc:creator>AYYASH</dc:creator>
 <guid isPermaLink="false">comment 1150321 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/mysqlinsertid#comment-1150320</link>
    <description> &lt;p&gt;$Id1 = mysql_insert_id(); # this will get the last AUTOINCREMENTed `ID` inserted into the database&lt;/p&gt;
 </description>
     <pubDate>Sun, 25 Apr 2004 06:51:52 +0000</pubDate>
 <dc:creator>s0da</dc:creator>
 <guid isPermaLink="false">comment 1150320 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
