DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 967,911 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Emekus
Emekus

Posted on

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

-2

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)

All DEV content is created by the community!

Hey, if you're landing here for the first time, you should know that this website is a global community of folks who blog about their experiences to help folks like you out.

Sign up now if you're curious. It's free!