User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 422,677 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,581 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser: Programming Forums

Mysql

Join Date: Oct 2006
Posts: 62
Reputation: welbyobeng is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
welbyobeng welbyobeng is offline Offline
Junior Poster in Training

Mysql

  #1  
Mar 13th, 2008
How can I create a trigger to UPDATE this for me when a new record is inserted.

I want to create a column called "fullthumb" where by default it has the words "http://example.com/thumbs/" and add the words in "thumb" column.

In syntax:
UPDATE files SET
fullthumb = CONCAT('http://example.com/thumbs/', thumb);

I know the general syntax of CREATE TRIGGER is :
        CREATE TRIGGER trigger_name trigger_time trigger_event ON tbl_name FOR EACH ROW trigger_statement

but I am new at mysql...Can someone help me create trigger with the above syntax
Last edited by peter_budo : Mar 13th, 2008 at 7:52 pm. Reason: Keep It Organized - please use [code] tags for easy readability
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 4:42 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC