Hi,
I am trying to output one field of a mysql database to a file but with a condition of another fields data.
i.e...
| field_a | field_b | field_c |
| 1 | a | Hello |
| 1 | b | World |
| 2 | c | Please |
| 2 | d | Help |
in the above table I want to output field_c which I know I do with the following:
Code:
SELECT field_c INTO OUTFILE '/tmp/file.txt' FROM table;
BUT... could my output file contain just field_c data but only if field_a = 1
so in this instance my output would be
Hello World
Thanks in advance for any help