Jump to content

List in MYSQL field


Nodral

Recommended Posts

Hi

 

I have a database which has been built by another party and they have used a field called param1 which contains all the details from a prepopulated dropdown list.  This is then referenced by number from another field (fieldid) in another table to get the single result.  How do I go about replicating this to get one answer?

 

eg

 

Param1 = Thailand Tunisia Turkey Ukraine United Arab Emirates United Kingdom United Kingdom - Islands - Guernsey United Kingdom - Islands - Jersey United Kingdom - Islands - Isle of Man Virgin Islands

 

fieldid = 6

 

hence this returns United Kingdom.

 

How can I split all the options out.  I thought about returning all entries and pattern matching, but as you can see there are some results which would contain capitals in vaiours places or speaces etc within the field.

 

I'm stumped!!!

 

Any ideas?  I can't change the way the database, but I need to be able to get the information out in a usable format.

 

Stu

Link to comment
https://forums.phpfreaks.com/topic/234326-list-in-mysql-field/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.