Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.