Jump to content


Photo

MySql get possible set values


  • Please log in to reply
2 replies to this topic

#1 rshadarack

rshadarack
  • Members
  • PipPip
  • Member
  • 29 posts

Posted 28 September 2006 - 01:42 AM

I have a set column in a table in mysql.  I wish to get a list (preferably some sort of array, but I could parse a list of text as well) of possible entries for that set.  What is the query to do so?

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 28 September 2006 - 02:16 AM

$query = "SELECT column_name from table_name";
$result = mysql_query($query);
....

Legend has it that reading the manual never killed anyone.
My site

#3 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 28 September 2006 - 02:43 PM

To be honest, I've never used that column type, but I assume it comes back comma-separated?
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users