Lost Password?


Go Back   CodeCall Programming Forum > Software Development > General Programming

General Programming Non language specific, Assembly, Linux/Unix, Mac and anything not covered in other topics. Talk about Programming Theory here.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-27-2008, 12:59 PM
Alhazred Alhazred is offline
Newbie
 
Join Date: Jul 2007
Posts: 23
Rep Power: 5
Alhazred is on a distinguished road
Default [MySQL] REFERENCING problem

I have a table called Account, with some coulmns (name, family_name, username, password, email), I need to start a trigger which starts a stored procedure only when an update is done to the Username column, not if I update any other column. I'm trying to do that as follows in the code. My DB is MySQL 5.1 Server.
I have a syntax error 'near REFERENCING NEW ROW AS new_user, OLD ROW AS old_user
FOR EACH ROW
ModificaUserna' at line 3

Code:
CREATE VIEW username_view
AS SELECT username
	FROM account;

CREATE TRIGGER modifica_username
AFTER UPDATE ON username_view
REFERENCING NEW ROW AS new_user, OLD ROW AS old_user
FOR EACH ROW
ModificaUsername(old_user.username_view, new_user.username_view);
Which is the problem? Is there another way to do what I need?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
serial port problem mld Pascal/Delphi 1 08-27-2008 11:44 AM
A little problem with C Irfanerol C and C++ 4 07-25-2008 02:50 PM
Peculiar UI Problem Needs Tackling adriyel C# Programming 2 04-06-2008 08:46 AM
Problem read pwd protected Access2K dbase - CR9 & VB6 mrbar Visual Basic Programming 2 03-10-2008 05:50 AM
How to tackle a programming problem? TcM General Programming 10 01-07-2008 12:29 PM


All times are GMT -5. The time now is 01:27 PM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 98%

Ads