hello everybody
I'm new to Php and I have a problem of concatinating string with variable. I have a stored procedure in mysql which takes 2 varaibles and inserts in the table. the variables actually are the string. THe varaible1 contains column names (including the brackets) and var 2 has values for these columns(including the word values). so my problem is how do i make a insert statement.
var1="(name,city,number)"
var2="values ('john mess','sanfrancisco','12414')"
the proccedure is below
create procedure testing (in var1 longtext,in var2 longtext)
begin
//how to make an insert statement so that the string looks like this - insert into mytable(name,city,number) values ('john mess','sanfrancisco','12414')
//how to concatinate the "inert into mytable " with my varaibles ...
end
delilmiter;
thanks plz help