Need A Reliable Software Technology Partner?
00D
00H
00M
00S
Explore Now
← Back to Articles
Development / backend API development

Laravel SQL issues while developing

PPrem1 Min Read
Laravel SQL issues while developing
In This Article
  1. uploading data from csv file into mysql table

I was stuck in some issues of laravel sql issues.. please see may help you in your development.

Sql script

LOAD DATA INFILE ‘C:\Workdir\cba\actualdata.csv’

INTO TABLE user

FIELDS TERMINATED BY ‘,’

OPTIONALLY ENCLOSED BY ‘”‘

LINES TERMINATED BY ‘\n’

IGNORE 1 ROWS

(uWhatsAppNo,uEmail);

SQL query: Copy

Fix Your Laravel & Database Issues Faster—Without Wasting Development Time

LOAD DATA INFILE 'C:\Workdir\cba\actualdata.csv'
INTO TABLE user
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 ROWS
(uWhatsAppNo,uEmail);

MySQL said: #29 - File 'C:\xampp\mysql\data\Workdircbaactualdata.csv' not found (Errcode: 2 "No such file or directory")

Solution: put the script inside as directed in error message:

Frequently Asked Questions

What is Laravel SQL issues while developing?

Facing issues importing CSV into MySQL using Laravel? Learn how to use the LOAD DATA INFILE method correctly with common fixes for SQL and file path errors.

Reader Responses

Join the Conversation

Fix Laravel SQL CSV Import Issues