Results 1 to 12 of 12
May 5th, 2008, 10:38 AM #1Uploading Datafeed to MYSQL Database
I've created the appropriate table structure for shareasale data uploads.
I was successful at getting one datafeed into the database, but I didn't write down the exact steps I used, and it was over 6 months ago, so now I'm trying with a new database and am having difficulty.
What I did that doesn't work:
1. Downloaded the csv database from shareasale.
2. Replaced userid with my number.
3. Opened the file in Excel.
4. Saved it as a csv file.
5. Went to MySQL ADMIN and clicked on Import in the table I created for the new data base (copied the table structure of the one that worked).
6. Clicked on Import.
7. Selected file to import in a csv format.
8. This is where I get confused...there are three choices csv, csv + load data and sql. I don't know which to choose.
9. Then I don't know if the file I've saved now has the | delimiters or comma delimiters so I don't know what to change in the fields terminated by or any other choices in that column.
Some of the choices I made resulted in uploading the file...but it only picked up the Product Id column and then stopped.
I know this is pretty basic stuff that I don't understand. I hope someone will help me.
May 5th, 2008, 12:08 PM #2
Question #8: You will need to select the csv format, because that is the format that you saved from excel in.
Question #9: You have comma delimiters. csv stands for comma separated values.
Let me know if this helps.
May 5th, 2008, 01:21 PM #3Still no luck
Do I just change the fields terminated by to a comma and leave the default for the rest of the fields?
Fields terminated by
Fields enclosed by
Fields escaped by
Lines terminated by
I keep getting this error message: Invalid field count in CSV input on line 17
May 5th, 2008, 01:26 PM #4Originally Posted by bluewaves1
You should be OK to just leave them at their defaults. The error you are getting means that the number of fields in your feed doesn't match the number in your database table. Even the blank fields in the data feed will count unless you delete them.
May 5th, 2008, 01:34 PM #5Help
It seems that when there are quotes in the description field...this messes things up. When I took the quotes out it helped..but then more errors appeared.
I don't know why the field count would change from one entry to the next. Do you?
May 5th, 2008, 02:09 PM #6spelling
If there are quotes in the description field, it will terminate that field string at the quote. For example:
"sku", "name", "this product is the "best" by far", "price"
The string will end at the first set of quotes before the word best. Then you are left with some extra stuff. This can throw off the entire import.
Quotations within the description field (or any field) are a pain in the you know what for data feed folks. Automating feeds does help because you can escape them. For excel, try saving a csv version of the feed and empty the description field, this way you will know for sure that it is the description field giving you the troubles.
Let me know what happens.
May 5th, 2008, 02:38 PM #7
There are a couple of classic threads here on putting datafeeds into MySQL tables. Always glad when my "oldie" status around here pays off and I can point some of you "newbies" in the right direction.
Try reading carefully through all of this thread:
Several of us here use variously modified/tweaked versions of that script for virtually everything we do with SAS datafeeds.
You also might want to go here to download a version of that same script which Sean, "mobilebadboy," created later.Generate more fake news.
May 5th, 2008, 05:42 PM #8Still having problems
I am getting an error message:
Warning: fgetcsv() expects parameter 1 to be resource, boolean given in /home/voipvide/public_html/coolchecks/ftp/7669.php on line 56
Warning: fclose(): supplied argument is not a valid stream resource in /home/voipvide/public_html/coolchecks/ftp/7669.php on line 84
when I run his scripts. Any thoughts?
May 5th, 2008, 06:00 PM #9
Verify that you have the right username and password for your ftp connection.
May 6th, 2008, 12:46 AM #10
fgetcsv() is the function that reads a line and turns it into an array. It expects that you have a properly opened file or it will not work.
I don't believe you are opening your file correctly.
May 6th, 2008, 01:34 AM #11Originally Posted by writerguy
You're doing a good job, I was about to post something similar but you beat me to it.
But now that I have had the time to rethink about it, I would like to ask you a question!
Haven't you noticed how some of these kind of replies usually go?
Haven't you noticed that some of us like you and me, and just a few others are willing to handle the question from any new child about telling them the truth about from where we come from if they ask, and the answers by others that may just talk about the birds and the birds?
I hope you do know what I mean, but if you don't understand this post, just PM me about it. Just make sure you don't play around with this issue with me, because I think you know me by now.
May 6th, 2008, 02:25 PM #12Originally Posted by Mr. Sal
Mr. Sal, I love it. Yeah, but it's good that a few people -- like YOU, like Snib, like Mobilebadboy (haven't noticed him around for awhie?), bettylou, and several others -- are willing to help.
I learned just about everything I have learned about PHP/MySQL from your patient "tutoring," Sal, and I appreciate that. And what you haven't taught me directly, you always motivated me to dig out answers when I could.
Like I said, I don't consider myself knowing all that much, but I'm glad I can help sometimes with my small knowledge. And I always appreciate it when you post about these coding issues, too!
To everyone else who does pitch in and help with this stuff, hooray for all of you! It's a great place for all of us to learn together and I know I really appreciate that.Generate more fake news.
By chillini in forum Programming / Datafeeds / ToolsReplies: 10Last Post: December 2nd, 2008, 02:06 PM
By Snib in forum Programming / Datafeeds / ToolsReplies: 10Last Post: September 8th, 2006, 01:24 AM
By AddHandler in forum Programming / Datafeeds / ToolsReplies: 2Last Post: March 25th, 2006, 04:29 PM
By Amavisca in forum Programming / Datafeeds / ToolsReplies: 0Last Post: July 6th, 2005, 06:43 AM
By ~Michelle in forum Programming / Datafeeds / ToolsReplies: 2Last Post: March 26th, 2004, 01:59 PM