For example, a field consists of two data, base level and job level, and are split with a delimiter.
Field Name: ‘baselvl:joblvl’
Example Data: ’70:30′ => the entry signifies base level of 70 and a job level of 30
I’m trying to include a search in a PHP website to grab data that fulfills certain conditions. For example, grabbing data that has a base level of 70 or higher. Or, say, a base level greater than 50 AND a job level less than or equal to 30.
Updated:
I forgot to mention that they designed this field such that the joblvl part is optional.
Example Data: ’70’ => the entry signifies base level of 70 and a job level of 0
And yes, I agree, the design isn’t that great – but I can’t change it. I have to work with how it is
try this:
I think you are using mysql. Use the following query to split the column..
Please note that, the best way is to store both the values in separate columns, other wise you in run into lot of problems like this in future