Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

mysql load data infile

Posted on 2009-05-12
2
Medium Priority
?
1,022 Views
Last Modified: 2013-12-12
for windows

mysql load data infile 'c:/infile.txt'
is proper syntax

and not 'c:\'
why
0
Comment
Question by:shopjd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
Bobaran98 earned 1000 total points
ID: 24370778
Probably because when you're working with slashes in PHP, the backslash is a reserved character.  For example, if you use PHP to echo "\n" or "\t" into your HTML code, you'll get a new line or a tab respectively.  If you'd like to use the actualy backslash, double it.  Thus the following would be as acceptable as what with a single forward slash:

load data infile 'c:\\infile.txt'
Read more here:  http://dev.mysql.com/doc/refman/5.1/en/load-data.html

Just search for the word "slash" about a fifth of the way down!
0
 
LVL 21

Assisted Solution

by:K V
K V earned 1000 total points
ID: 24372401
It can be
mysql load data infile 'c:/infile.txt'
or
mysql load data infile 'c:\\infile.txt'

extra \ required for escaping
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question