Support the ongoing development of Laravel.io →
posted 9 years ago
Database
Last updated 2 years ago.
0

Hi rorossf, That depend of what you want exactly. If you want update one time your database with a csv put your code in Command laravel and execute it in cli.

If you want regularly update your database the best way is:

  • Open the csv
  • Read for example 100 line
  • Update your database
  • Remove the line from your csv
  • Repeat this action when the csv is not empty. Repeat this action with a cron with the often you like.

Have a look here to read and remove line at same time http://stackoverflow.com/questions/2404707/is-this-the-most-ef...

Last updated 9 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

rorossf rorossf Joined 6 Sep 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.