Forum Moderators: coopster
Can you look at this for me please
im beeing asked by phpmyadmin (when uploading a csv file) for info such as
Fields enclosed by
Fields escaped by etc etc
here is a line from my file
'OrderID','CountyLocation','Postcode','MakeofCar', 'ModelofCar','Trim','Price','RegYear','RegLetter', 'Mileage','BodyStyle','Transmission','FuelType', 'VehicleCC','Colour','NoDoors','CarDescription', 'ImageLink','ContactName','PhoneNumber','EmailAddress'
i was using the following
Fields terminated by = ,
Fields enclosed by = '
Fields escaped by = '
Lines terminated by = \r\n
Is this correct if not what should i be using please? Thanks in advance for any help
[edited by: jatar_k at 8:23 pm (utc) on Feb. 7, 2005]
[edit reason] fixed sidescroll [/edit]
what attributes should i use for a text coloum should it be binary?
Depends on what you're doing with the data but usually VARCHAR is good enough.
Fields terminated by = ,
Fields enclosed by = '
Fields escaped by = '
Lines terminated by = \r\n
Looks good except I'd make the fields escaped by \. This is for things like a last name of O'Brien which needs to be O\'Brian so it knows to insert the '. Unless you know that these types of things are escaped by a ' then the default is \.
Tim
you can download putty here
[chiark.greenend.org.uk...]
it's nice and free ;)
connecting putty to a server is fairly simple. All you need is to enter the hostname or ip for the server to connect to and then the protocol, I always use ssh
you will get asked for a username and a password once you are connected to the server, which you should have for ftp already. Then you can connect to mysql exactly as you would using your scripts, usually something like
for localhost
mysql -u username -p
then you will be prompted for your mysql password
for remote host
mysql -h hostname -u username -p
then you will be connected to mysql and can type in your commands at the prompt. It takes a while to get used to but it is a much more powerful and intuitive way to interact with mysql (imo) and it will better your sql skills more quickly ;)
see
mysql, the Command-Line Tool [dev.mysql.com]