Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> help with wget and mySQL
amylisa
post Mar 3 2008, 09:02 AM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 1
Joined: 3-March 08
Member No.: 13,359



hi smile.gif I have no idea how to work linux and i'm trying to make a cron for my server. I want it to got to a url and download a file there, then to delete the old values in a mySQL table and import the new ones.

The problem I'm having with getting the file is that the url is in this format -
CODE
http://somewebsite.com/wallet.csv.aspx?user=00000&password=0000

How would I get this to download the file and save it as " wallet.csv " and overwrite the old file?

I have this for clearing the old table and importing the file (I think it's correct but I cant test is since I can get the file yet :/) Does this look like it will work or have I done something wrong?
CODE
mysql -h __host__ -u __username__ -p __database__ -e "DELETE * FROM table_name"
mysql -h __host__ -u __username__ -p __database__ -e "LOAD DATA INFILE '/wallet.csv' INTO TABLE wallet FIELDS TERMINATED BY ','";
Go to the top of the page
 
+Quote Post
michaelk
post Mar 3 2008, 01:47 PM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,797
Joined: 23-January 03
Member No.: 360



Check the wget man pages but use the -O option like:
wget http://somewebstite.com/... -O filename

I do not use mysql so I can not verify your syntax.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 19th October 2017 - 02:21 AM