<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1043216" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1043216</link>
    <description></description>
    <language>en</language>
          <item>
    <title>Hello Gusy......
Look keyword</title>
    <link>https://www.webmaster-forums.net/web-database-development/sql-triggers#comment-1287699</link>
    <description> &lt;p&gt;Hello Gusy......&lt;br /&gt;
Look keyword so some write content and click linking keyword so take more than more knowledge.....................&lt;/p&gt;
 </description>
     <pubDate>Tue, 03 Dec 2013 11:32:20 +0000</pubDate>
 <dc:creator>rosyhyden</dc:creator>
 <guid isPermaLink="false">comment 1287699 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>thanks for info</title>
    <link>https://www.webmaster-forums.net/web-database-development/sql-triggers#comment-1287627</link>
    <description> &lt;p&gt;thanks for info&lt;/p&gt;
 </description>
     <pubDate>Tue, 26 Nov 2013 10:55:28 +0000</pubDate>
 <dc:creator>tejayasarapu</dc:creator>
 <guid isPermaLink="false">comment 1287627 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>An SQL trigger cannot be</title>
    <link>https://www.webmaster-forums.net/web-database-development/sql-triggers#comment-1285580</link>
    <description> &lt;p&gt;An SQL trigger cannot be directly called from an application. An SQL trigger is invoked by the database management system on the execution of a triggering insert, update, or delete operation.&lt;/p&gt;
 </description>
     <pubDate>Thu, 20 Jun 2013 06:23:26 +0000</pubDate>
 <dc:creator>semaphore.v</dc:creator>
 <guid isPermaLink="false">comment 1285580 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>CREATE TRIGGER ai_SetURL</title>
    <link>https://www.webmaster-forums.net/web-database-development/sql-triggers#comment-1284838</link>
    <description> &lt;p&gt;CREATE TRIGGER ai_SetURL AFTER INSERT ON tblEvent&lt;br /&gt;
FOR EACH ROW UPDATE tblEvent SET EventURL=CONCAT(&quot;whatever.php?event=&quot;,EventID)&lt;/p&gt;
 </description>
     <pubDate>Thu, 23 May 2013 05:22:13 +0000</pubDate>
 <dc:creator>shivendra</dc:creator>
 <guid isPermaLink="false">comment 1284838 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Triggers are used to perform</title>
    <link>https://www.webmaster-forums.net/web-database-development/sql-triggers#comment-1284822</link>
    <description> &lt;p&gt;Triggers are used to perform particular action whenever some insert, update, delete commands executed, they are used to control, monitor and manage group of tables.&lt;/p&gt;
 </description>
     <pubDate>Thu, 23 May 2013 04:11:05 +0000</pubDate>
 <dc:creator>Tanmay</dc:creator>
 <guid isPermaLink="false">comment 1284822 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>SELECT</title>
    <link>https://www.webmaster-forums.net/web-database-development/sql-triggers#comment-1239063</link>
    <description> &lt;blockquote&gt;&lt;p&gt;
SELECT CONCAT(&quot;whatever.php?event=&quot;,EventID) AS EventURL FROM tblEvent
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Building on pr0g&#039;s idea, you could create a view using that concat logic. Your client&#039;s editor probably wouldn&#039;t know the difference between a view and a table.&lt;/p&gt;
&lt;p&gt;Another thing you might want to try is putting your update logic in a stored proc, and calling the stored proc in your trigger.&lt;/p&gt;
 </description>
     <pubDate>Fri, 06 Mar 2009 05:15:00 +0000</pubDate>
 <dc:creator>teammatt3</dc:creator>
 <guid isPermaLink="false">comment 1239063 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Shaggy wrote:
You&#039;re</title>
    <link>https://www.webmaster-forums.net/web-database-development/sql-triggers#comment-1239056</link>
    <description> &lt;p&gt;&lt;div class=&quot;quote-msg&quot;&gt;&lt;div class=&quot;quote-author&quot;&gt;&lt;em&gt;Shaggy&lt;/em&gt; wrote:&lt;/div&gt;You&#039;re trigger is fired &#039;on insert&#039;&lt;br /&gt;
you&#039;re trigger is performing an update.&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Logically yes, but seemingly you cannot update the same table that invoked the trigger, regardless of difference between query and trigger event type (possibly something to do with the MYSQL table lock- dunno). &lt;/p&gt;
&lt;p&gt;It returns an error though, and there are bugs reported (and people venting their frustration) about this around the net, including on dev.mysql.com.&lt;/p&gt;
&lt;p&gt;There are ways around certain requirements by using a BEFORE trigger.&lt;br /&gt;
But as trying to get next value of a MYSQL auto inc is a bad idea, Greg needs to do the actual insert first to obtain the auto increment ID to append to the &#039;VALUE&#039; on UPDATE, using BEFORE wont work for him.&lt;/p&gt;
&lt;p&gt;(also, obviously there would be no row to update to before the insert)&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://crazytoon.com/2008/03/03/mysql-error-1442-hy000-cant-update-table-t1-in-stored-functiontrigger-because-it-is-already-used-by-statement-which-invoked-this-stored-functiontrigger/&quot;&gt;Link to an example&lt;/a&gt;&lt;/p&gt;
 </description>
     <pubDate>Thu, 05 Mar 2009 20:51:00 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1239056 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>I&#039;m still a little... not</title>
    <link>https://www.webmaster-forums.net/web-database-development/sql-triggers#comment-1239050</link>
    <description> &lt;p&gt;I&#039;m still a little... not sure of the emotion.. that MySQL doesn&#039;t support your trigger.  I&#039;m not buying the &#039;infinite loop&#039; argument, no matter who&#039;s selling.&lt;/p&gt;
&lt;p&gt;You&#039;re trigger is fired &#039;on insert&#039;&lt;br /&gt;
you&#039;re trigger is performing an update.&lt;/p&gt;
&lt;p&gt;You know, in a sane db that has sequences, you could just:&lt;/p&gt;
&lt;p&gt;insert into test&lt;br /&gt;
(id,&lt;br /&gt;
val)&lt;br /&gt;
values&lt;br /&gt;
(nextval(&#039;sequence_name&#039;)&lt;br /&gt;
, &#039;url?id=&#039; || currval(&#039;sequence_name&#039;));&lt;/p&gt;
&lt;p&gt;I know, you&#039;re all jealous of my MySQL free environment now, aren&#039;t you! -- this post provided no help to anyone... anywhere.  It&#039;s been a long week.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;br /&gt;
Shaggy&lt;/p&gt;
 </description>
     <pubDate>Thu, 05 Mar 2009 19:00:30 +0000</pubDate>
 <dc:creator>Shaggy</dc:creator>
 <guid isPermaLink="false">comment 1239050 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Who said that? 
I changed my</title>
    <link>https://www.webmaster-forums.net/web-database-development/sql-triggers#comment-1239049</link>
    <description> &lt;p&gt;Who said that? &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/tongue.png&quot; title=&quot;Sticking out tongue&quot; alt=&quot;Sticking out tongue&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I changed my post (same time as you where writing) to give the reason why it&#039;s not what he wants.&lt;br /&gt;
 But dammit you must have been pressing refresh until someone replied ! &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/grin.png&quot; title=&quot;Laugh&quot; alt=&quot;Laugh&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Thu, 05 Mar 2009 18:49:00 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1239049 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Wouldn&#039;t that need the row</title>
    <link>https://www.webmaster-forums.net/web-database-development/sql-triggers#comment-1239048</link>
    <description> &lt;blockquote&gt;&lt;p&gt;Wouldn&#039;t that need the row to have already been created (inserted) to obtain the ID.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Yes - insert the data normally, and then concat that extra bit of data when you select that row from the DB later.&lt;/p&gt;
 </description>
     <pubDate>Thu, 05 Mar 2009 18:47:29 +0000</pubDate>
 <dc:creator>pr0gr4mm3r</dc:creator>
 <guid isPermaLink="false">comment 1239048 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
