Waftrue A. Waftrue A. - 24 days ago 19
MySQL Question

Selective export from MySQL database

I've got a database called Members, people would register online entering their fullname, email address, phone number, etc. I made a hidden form where it would set random 4 digit unique number and register it with their data, then I send it via email. People would use these unique IDs to enter an event, only 80% came. I collected the IDs, now I have a list of IDs that belongs to the people that came to the event, I want to export all the rows of people who came using their IDs. Example: For every row that include number: 4293, 1932, 9382 = export. Is there's a way to do this in MySQL?

Answer

Following query should do the trick

select fullname from members where ID in (4293, 1932, 9382)
Comments