In Joomla 2.5 and 3.0 I am able to get the database result set as an array. Is it possible to convert this array as sql insert statement or .sql file so that the same can be used to insert in another table of same structure in another database?
Share
Yes you can, Check the code below. You can use the Joomla core function to get this done.
1st initialize a data set as below.
Then load the row into the data set as below.
Then insert the row using Joomla tables.
All above functions are in the model. Hope you can manage function calls in the controller. If you want to do multiple insertions loops the function calls. If you have any issue let me know