This is a discussion on Ordered lists within the MySQL Database forums, part of the Database Forums category; Hi, I need to store ordered lists in my database. I have several lists like 'I don't agree'=1, '...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
I need to store ordered lists in my database. I have several lists like 'I don't agree'=1, 'I agree'=2, 'I totally agree'=3 Quotes are not the same all times (letters could be used), that's why I want to store thems, with the position because 'I agree' must be always in the middle of the list. How to do this with mysql ? thanks. |
|
|||
|
>I need to store ordered lists in my database.
You need to use ORDER BY when you retrieve the data. SQL tables don't have any order. >I have several lists like 'I don't agree'=1, 'I agree'=2, 'I totally >agree'=3 >Quotes are not the same all times (letters could be used), that's why I >want to store thems, with the position because 'I agree' must be always >in the middle of the list. Record the choices along with the values, or if ordering by the values doesn't always work (the values don't establish the correct order), also have an "order" column whose sole function is to establish the order. |