Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql into outfile with headers

SELECT * FROM (
    SELECT 'username','email'
    UNION ALL
    (
        SELECT `username`,`email`,`steam_id` FROM `users` WHERE `userna` LIKE '%@temp%'
    )
) resulting_set
INTO OUTFILE '/results/result.txt' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '
';
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mysql #outfile #headers
ADD COMMENT
Topic
Name
7+2 =