0

I have created a database of my clients. Each client has got an email address and the date when I added the record. When I put in a search box eg 2015-12-10 I can see all the entries of this day filtered so I can see all the companies I added that day, BUT I would like to export only emails to cvs or excel but without using phpmyadmin just with a "click". I would be grateful for the hints. Thank You Hubert

1 Answer 1

1

For one click...you could simply execute code like this which would be one press of the execute button:

SELECT emails
INTO OUTFILE '/tmp/emails.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM mydatabase
WHERE date = '2015-12-10'
;

Or, for two clicks...

With MySQL workbench, DB Forge, and other MySQL database frontends you can export to Excel very easily (but with two clicks...first the export button, then save). You simply need to write your select statement first.

Or, with a few more clicks...

You could use an MS Access frontend and create a linked table to your MySQL database. In Access you could have saved queries with parameters, where, once opened you could then export to Excel...but again, may be more than one click to achieve this.

Sign up to request clarification or add additional context in comments.

3 Comments

ok thank You but I wanted to do it with "one click" so I meant 2-5 clicks :) J would like it to be like this: I write any date in a search box the records are listed and than I click export and I receive a file with eg emails it could be in excel or any other program bc I would like to be able to select these addresses and paste them to email and send a message to those entries... Hubert
Thanks for the answer tick. :) What you want could be done pretty easily in java (or other programming languages). You would have a text box where you would enter the date, and then when you click 'submit' button it could retrieve the records (e.g. email addresses) via JDBC connection and send the emails for you as well even using SMTP. Think if you literally want 1 click, you would have to use a scripting or programming language.
ok :( thank You it can be even more clicks but what You say seems to be more complicated for such a amateur as me... I thought its easier. Hubert

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.