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.