I have a field, status, that can be either: ACCEPTED REJECTED In Process PAID on [date paid] I want to order results like this: ORDER BY FIELD(status, 'In Process', 'ACCEPTED', 'PAID', 'REJECTED') So In Process would be on top, followed by accepted, then paid, and finally rejected. However, the ones that are PAID also have a date, and this doesn't work. Can I use regular expressions to solve the problem?
Hi, I guess it is related to that you use 'PAID', but the value in the field not just 'PAID' huh ? that is the why 'PAID' comes first.. You can do another field named by 'paiddate' and insert the date paid value in here. And the just 'PAID' goes to status field..
Yeah, I think I really should do that because tacking the date on to the end really isn't the right way to do it.