Home > Backend Development > PHP Tutorial > How to create fake information in php mysql

How to create fake information in php mysql

WBOY
Release: 2016-10-11 14:23:15
Original
1147 people have browsed it

This is it. I need some data for testing
So I need to create fake data.
I would like to ask how to use PHP to write a fake data to the database?
My database has a main key called buy_id (it will be AUTO_INCREMENT)
It would be best if I could set how many pieces of fake information to create?

Reply content:

This is it. I need some data for testing
So I need to create fake data.
I would like to ask how to use PHP to write a fake data to the database?
My database has a main key called buy_id (it will be AUTO_INCREMENT)
It would be best if I could set how many pieces of fake information to create?

After PHP connects to the database, it loops to construct the data based on each field that needs to be inserted, and then inserts it into the database

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template