Monday, May 21, 2012

MYSQL export Value and NOT ID

I have a MYSQL database table with a field that contains information like below...



ID: 1 with a VALUE: Apple

ID: 2 with a VALUE: Orange

ID: 3 with a VALUE: BANANA


I wish to export the data VALUE, but currently can only pull out the ID.
For example, I want to export the words "APPLE", "ORANGE" etc - meaningful names, and NOT just "1", "2" etc.



My actual query line thus far....



SELECT ID,time,quote,media,pack FROM database_table_name


The issue is the 'pack' field renders the id numbers, not the real names on export. Any ideas how to access the real names instead??





No comments:

Post a Comment