Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7915743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:33:44+00:00 2026-06-03T14:33:44+00:00

To write to the MySQL database 3000 lines. INSERT INTO test (id, test) VALUES

  • 0

To write to the MySQL database 3000 lines.

INSERT INTO test (id, test) VALUES ("1", "test");
INSERT INTO test (id, test) VALUES ("2", "test");
INSERT INTO test (id, test) VALUES ("3", "test");

...

INSERT INTO test (id, test) VALUES ("3000", "test");

How to share request for parts that the database didn’t hang up?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T14:33:46+00:00Added an answer on June 3, 2026 at 2:33 pm

    Is it that you have 3000 rows to insert but don’t want to write them all out? If so use this:

    $insert = '';
    $count = 1;
    while ($count <= 3000) {
      $insert .= "('$count', 'test'), ";
      $count++;
    }
    
    $insert = substr($insert, 0, -2);
    
    INSERT INTO test (`id`, `test`) VALUES $insert;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to write a script that returns rows from a mySQL database. Basically,
I'm about to write a Scala command-line application that relies on a MySQL database.
I am trying to write a PHP-MySQL database processor that is somewhat intelligent. When
I'm trying to write query to a MYSQL database that queries for products that
I want to write into a mysql database a timestamp in real milliseconds (I
I have to write the values of the XML elements to the MySQL database.
I have a mysql database of articles that were entered into a textarea with
currently I'm using phpunit to write tests for some functions that access a mysql-database.
I'm trying to write a application that sends user's geolocation to MYSQL database every
I am trying to write a script to patch our mysql database. Something like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.