I have current mysql database and i want to make a query to this database with php and if any number of rows are selected based on this mysql query. I want to take variables from these selected rows and want to add this data to new mysql database i.e select rows from old database selected with WHERE clause and add these rows to new database. Is it possible in mysql with php. Thanks in advance.
Why not simply :
INSERT INTO NewDB.YourTable
SELECT * FROM OldDB.YourTable
WHERE ...