DEV Community

Nnaemeka
Nnaemeka

Posted on

How to fetch data from mysql table and insert into another table using php?

Here is my sql query below

select Client, count(*) as Sales FROM sale_tbl GROUP BY Client

The query will fetch records like this

Client Sales
John     5
Bob      4
Doe      5

Now i want to insert this record into another table in the same database named data_tbl with three(3) columns…

Top comments (0)