Solved

mysql load data infile

Posted on 2009-05-12
2
1,014 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
2 Comments
 
LVL 8

Accepted Solution

by:
Bobaran98 earned 250 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:theGhost_k8
theGhost_k8 earned 250 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
form button worked now it doesnt anymore 9 42
RDBMS and No sql database 4 47
Method for submitting dynamically created rows 20 18
php convert date format 3 0
This article discusses four methods for overlaying images in a container on a web page
This article discusses how to create an extensible mechanism for linked drop downs.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

863 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now