hook for concat()

juergen_mueller

DaDaBIK Guru
Hi Eugenio

It's possible to define a hook for updating a field value with a CONCAT command by adding strings and a value from another field?

Example:

field_value2 = CONCAT(string,field_value1,string2)

Best

Juergen
 

eugenio

Administrator
Staff member
Hello Juergen,
yes you can do it in PHP using the standard concatenation operator (the dot .) or you can do it in SQL, an example for MySQL is

UPDATE mytable SET myfield = CONCAT ('mystring', myfield2) WHERE ....

Best,
 

juergen_mueller

DaDaBIK Guru
Thanks, Eugenio

I guess I have to follow the procedure given in your example: 'function dadabik_send_notice_after_accounts_insert($id_account)' - right?

Best

Juergen
 

eugenio

Administrator
Staff member
It depends on when you want the hook to be triggered, is it a piece of code you want to execute after the insertion of a record? If yes, sure, you can use dadabik_send_notice_after_accounts_insert as example.

Best,
 
Top