Replace variables stored in mySql

1

Is there any way to replace variables stored in a string of mysql?

Currently I want to store different chains like this in mysql:

  

Dear customer,

Thank you for buying in   ".common :: getInfoWeb (" name ")." We have received the payment correctly   of your order ". $ idc."

As soon as we put it into preparation,   We will indicate the approximate delivery time by means of a new   email.

For any other questions, do not hesitate to contact   contact us.

Thank you very much for your trust.

And I want both the variable

  

common :: getInfoWeb ("name")

as the variable

  

$ id

are replaced by the values I have in my script.

Edit:

I add the script, although I do not know if it is necessary:

for my $st (sort { $stats{$a} <=> $stats{$b} } keys  %stats) {
     if($sta==2){

        $argsMail{TEXTMAIL} = textManager::getText($dbh,"TextoEstado2",common::getDefaultLang());;

        $subject = common::getInfoWeb("nombre")." - Confirmación de Pago ";
        $string = templateManager::getTemplate('cambio_estado_mail', %argsMail);
     }
  } 

I'm working with perl. This script executes a sql call and stores the result in a variable of a hash, which is then sent to a template in order to build an email.

    
asked by yhazius 16.10.2017 в 10:11
source

1 answer

1

Thanks to @ JoseD.Jurado who has given me the key. You only make a replace of the variable you want to change by the value to be used and that's it. Greetings

    
answered by 16.10.2017 в 10:28