i need help bad friends, my csv will not replace the table, it only adds new lines help someone please help us.
we want to upload our csv files and replace the values already in and 1st line on our csv is our headers
bobsaget121(Friday 21st of March 2008 06:11:15 PM)
Try looking around for DROP IF EXISTS `tablename` then under that re-create the table ;)
iloveReeperbahn(Wednesday 27th of February 2008 10:47:32 AM)
haha it didnt work haha
bobsaget121(Sunday 6th of January 2008 03:06:10 PM)
I found the error later on when trying to use a site with basically full javascript. I had used the web developer toolbar to disable javascript so i don't get random ass pop-ups but it worked too well and disabled the browser button :P
yeah that toolbar is awesome. so what's the best way to turn a comma or tab delimited file into an sql file. i.e. "blah, blah, blah" to turn into "INSERT INTO TABLE Somethin VALUES ('blah','blah')" because i haven't been able to figure out the easiest way.
bobsaget121(Monday 7th of January 2008 12:17:09 PM)
like its a regular sql file yet has tabs before the sql?
Create Table `test` (
`id` int( 11 ) not null auto_increment,
`test_text` text not null,
Primary Key(`id`)
);
type deal?
So it's a .csv or .txt or .xls file that needs to be a .sql file.
Maybe I'm just going about this the wrong way. I just want the data within this gigantic ACCESS/EXCEL file to be entered into my MySQL database so I can run queries on it.
bobsaget121(Monday 7th of January 2008 04:52:30 PM)
ah yeh, should be able to import the same way :) i was just using .sql as an example.
yay i kinda figured out a way. i go .xls -> .csv then import the .csv file. it was still quite the bitch to search for all "\" and quotes and other characters that needed to be escaped. *sigh*, ok now to figure out the best way to import IMAGES into this database. I have to admit this is kind of fun. Thanks for ur help btw. do you have a blog or anything?
bobsaget121(Tuesday 8th of January 2008 12:17:36 PM)
i'm in the process of coding a custom blog for me :P i'll post a link on my profile when its done.