Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Slight Modification' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Slight Modification
Authored by: nvdingo on Nov 25, '02 01:18:22PM

Change 1
most shells don't like spaces, and i received an error the first time i tried this, so the line should be:
pen -a /Applications/Microsoft\ Office\ X/Microsoft\ Excel /tmp/sql_excel.tmp

Change 2
since i have 10 different databases that i routinely work on, on the same server, i changed the mysql command a bit so that command line parameter one is the database and two is the query
mysql -h myhost -u userid -ppassword -e "$2" $1 > /tmp/sql_excel.tmp
and of course, i changed teh echo command to spit out $2 instead of $1

Additional option.
I play with mysql data so often that i aliased the command and some common queries in my .cshrc file



[ Reply to This | # ]
RE:Slight Modification
Authored by: nvdingo on Nov 26, '02 01:16:11PM

\0\05{\0\0\0\0\0\0\0\0to the other 2 posts that popped up after this.
I should add that, i have my MySQL connections tunneled through SSL.

AND the user that i login in as in MySQL for this, has SELECT only permissions.
no DELETE no UPDATE, and DEFINITELY no DROP.



[ Reply to This | # ]