Answer the question
In order to leave comments, you need to log in
MySQL: LOAD DATA INFILE. How to save existing value in database?
What is:
A site for transferring water readings, and viewing current debt.
There are more than 100,000 personal accounts in the database.
What the site is made on:
PHP, MySQL
How the process of updating debts takes place:
Create a file in txt format, it contains the necessary fields, the key field is the account number.
Separation goes through ';'.
This file loads all faces into the database. accounts with the necessary information.
The request itself:
$query = "LOAD DATA INFILE '".$filename."' REPLACE INTO TABLE `account` FIELDS TERMINATED BY ';' (`id`,`lastname`,`street`,`house`,`housing`,`apartment`,`debt`,`balans`)";
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question