⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

how to minus row from relation table



DREON

DREON
  • profile picture
  • Member

Posted 23 April 2013 - 13:19 PM

i have 2 table, one table called

 

info

with column

 

                          id     |       name     |   sick_leave      |   vacation_leave

example:            1       robert cruz             24                          24

 

seconde table

filed

with column

 

                         id          | name1(related to info table column name)         |      filed_sickleave

example1:           1                    1                                                                            1

 

my question is:   how can i minus the filed_sickleave   from filed table  to  sick_leave  info table

 

the result is 23 on my sick_leave info table after  adding 1 to   to filed table filed_sickleave                                              

 

 

 


davidoster

davidoster
  • profile picture
  • Member

Posted 23 April 2013 - 22:48 PM

http://www.grocerycrud.com/documentation/options_functions/callback_after_update / http://www.grocerycrud.com/documentation/options_functions/callback_before_insert


DREON

DREON
  • profile picture
  • Member

Posted 26 April 2013 - 06:52 AM

any sample code please


DREON

DREON
  • profile picture
  • Member

Posted 14 May 2013 - 05:28 AM

help please..


victor

victor
  • profile picture
  • Member

Posted 16 May 2013 - 00:07 AM