i have the following code.My table is called ‘tableu’.I want replace ‘tableu’ with a variable that will hold the table name. How can i represent that.
query.prepare(
"INSERT INTO tableu (village, weight, diet, age)"
"VALUES (:village, :weight, :diet, :age)"
);
If you want to change your table name from
tableuto lets sayNewTableName, it can be done using any of the following syntax:OR
Update:
May be the OP is looking for this.