DANDARSMASH
Programmer
Hello.
I'm doing an SQL query and converting it to XLS. When I run the query on the localhost DB, The file outputs to the specified location at C:/tmp/myfile.csv. However, when I run the query on the live DB, it outputs to the DB server at /home/mysql/csv/myfile.csv. As result, I can only see the file if I SSH into the server machine. Is there a way to get the the live file to export to my local machine? Pointing it to C:/tmp/myfile.csv has no result.
"Any sufficiently advanced technology is indistinguishable from magic" [Arthur C. Clark]</td></tr></table>
I'm doing an SQL query and converting it to XLS. When I run the query on the localhost DB, The file outputs to the specified location at C:/tmp/myfile.csv. However, when I run the query on the live DB, it outputs to the DB server at /home/mysql/csv/myfile.csv. As result, I can only see the file if I SSH into the server machine. Is there a way to get the the live file to export to my local machine? Pointing it to C:/tmp/myfile.csv has no result.
SQL:
SELECT p.paymentdate, p.filenumber, p.paymentstatus, p.paymentamount, d.fullname, d.address, d.city, d.state, d.zip, d.makepayabletoname, d.makepayabletoaddress, d.makepayabletocity, d.makepayabletostate, d.makepayabletozip, d.emailaddress
FROM payments p, dbase d
WHERE p.filenumber = d.filenumber
AND p.paymentstatus = "pending"
AND p.paymentdate = curdate()
INTO OUTFILE "C:/tmp/text.csv"
FIELDS TERMINATED BY ","
ENCLOSED BY "\""
ENCLOSED BY "\ "
ESCAPED BY "\ \ "
LINES TERMINATED BY "\n"
"Any sufficiently advanced technology is indistinguishable from magic" [Arthur C. Clark]</td></tr></table>