Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: MySql Triggers

  1. #11

    ^ salamat ayu...

  2. #12
    Quote Originally Posted by xiao-xiao View Post
    dili lage mugana... pati butngan nako ug delimiter ug end if... dili japon
    Example ra na cya ... try to get help from mysql documentation.

  3. #13
    kulang ra mn tong sa documentation. gamay ra examples.

  4. #14
    nganong itrigger paman gyud? your just adding additional task sa imong database. why not during saving adto ka didto mag CASE then diretcho insert sa table.. either ibutang nimo sa imong business object or sa imong stored procedure.

  5. #15
    ^ magbuot ra ba ai. mas ayus mn i-trigger na kay for example kung feel sa admin nga sa sa backend xa manghilabot sa grado.. dili na kapoy mag-change sa value sa remarks... gets mo?
    Last edited by xiao-xiao; 06-13-2009 at 01:01 AM.

  6. #16
    wala man ko nagbuot bai.nangutana raman ko.. also follow up. nganong manghilabot man pud ang admin sa backend? unsa diay gamit sa imong program kung modretcho sila sa backend?

  7. #17
    what if naay maintenance sa frontend? tapos ipa-edit ka ug 100 or more ka grades... sugot ka nga mag-edit2x pa ka sa value sa remarks?
    anyway, bacn maabot ta ug lain topic ani. i'm here for mysql triggers not for alternative solution
    Last edited by xiao-xiao; 06-13-2009 at 11:27 AM.

  8. #18
    putting business logic in the backend has pros and cons - usa ka advantage of putting it on the database is you don't have to re-write your client apps. Kung complicated ang pag update sa client apps, nya labina daghan pa gyud kaayo (say 1000 clients), the tasks of updating each one of them maybe complicated, then changing the business logic sa backend might be a good solution. The disadvantage, is now you're putting your database to work which may not be efficient kung dagko ug load. But then again this boils down to planning the architecture in the first place and scalability sa app.

    Bear in mind that triggers are activated only during update, insert or delete, kung imo i update ang remarks on database maintainance, try to do it in a script or better yet write a stored proc nalang.

  9. #19
    ^ i know all that stuff. in the first place, grade management system mn ni... dili bya taga-adlaw mag-change ug grado... so why worry about task/load of mysql?

    again... i'm here for mysql trigger... not for alternative solutions.
    Last edited by xiao-xiao; 06-13-2009 at 01:38 PM.

  10. #20
    dili lage ni mugana ang nested if...

    Code:
    DELIMITER |
    
    CREATE TRIGGER set_remarks
    BEFORE UPDATE ON subjects_enrolled
    
    FOR EACH ROW
    
    BEGIN
    
    IF NEW.grade <= 3.00 THEN
    	SET NEW.remarks = 'Passed';
    ELSE IF NEW.grade = 'INC' THEN
    	SET NEW.remarks = 'Incomplete';
    ELSE IF  NEW.grade = 5.00 THEN
    	SET NEW.remarks = 'Failed';
    ELSE
    	SET NEW.remarks = 'No grade yet';
    END IF;
    
    END;
    |

  11.    Advertisement

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

 
  1. MySql Triggers
    By xiao-xiao in forum Software & Games (Old)
    Replies: 2
    Last Post: 06-12-2009, 12:33 PM
  2. Webhosting sites with PHP, MYSQL and etc
    By ravenclair3 in forum Websites & Multimedia
    Replies: 9
    Last Post: 08-13-2006, 10:27 PM
  3. remember Chrono trigger and other snes rpg's
    By Wilson in forum Software & Games (Old)
    Replies: 35
    Last Post: 08-25-2005, 07:33 PM
  4. VB OLEDB ---> APACHE SERVER MYSQL
    By rvyne in forum Websites & Multimedia
    Replies: 12
    Last Post: 07-09-2005, 12:10 PM
  5. Where: Cebu based PHP/MySQL based hosting
    By cmontoya in forum Websites & Multimedia
    Replies: 19
    Last Post: 06-29-2005, 10:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top