I cant seem to get this sort order working, but from everything i’ve read, it should be working!
The database has a table with form field contents in, so for example to select age in a drop down, it finds all the rows with an id_field value of 2, and puts them in the drop down, great.
I thought it was working, until someone ‘kindly’ pointed out i hadnt included the age “58” so i added it to to DB, and sure enough it appeared in the dropdown, but as the last entry.
I cant get it to position itself between 57 and 59!
I obviously entered them into the DB in the correct order, so thought it was working, doh!
Any help appreciated.
ps sorry about the icons, they are keeping me ‘up beat’ lol
I just wanted to store all the "pre poulated" field values somewhere, so that I can change them once, and all forms get updated - also at some point, allow Admin to set them via the GUi…
MySQL yep. Perhaps then I should create two columns, one varchar, the other int…
I’m not an angel but I generally don’t hurt anyone. I was just surprised
I understand what you want to do, but you’ve already experienced one downside of it for sorting.
And if I were you, UX-wise, I wouldn’t really use a dropdown for something like age. I’d rather use a slider. And do you really need to have age values stored in database?
Anyway, I’m really just saying out loud what I think. Feel free to do as you need.
PS I’ve just realized we are in the Yii 1.0.x subforum… Is it on purpose?
I’ve created two columns now, value_int and value_char this has solved the ordering problem. thanks for steering me there.
I’d quite like to use a slider - but for now, im building a quick and dirty application to solve a problem - but that can be built upon going forwards - with things like sliders! actually, i did have a slider for £House Value, but ran into difficulties, so bailed until I have time to go back and make it work…
Oh, didnt realise i was in the Yii 1.0.x forum, opps.