View Full Version : auto input into alternating rows...
azemiops
05-11-2003, 11:25 PM
i'm having a difficult time trying to do something that should be simple. I'm sure I'm missing something.
How can you set a field to auto-alternate content such as left/right or true/false?
help?!?
thanks in advance. I'm currently trying to compensate via php, but if this is possible it would eliminate a bunch (so far) of buggy code.
Welcome here.
auto-alternate content such as left/right or true/false
What does that mean? When would you use it (when inserting records?)?
Also, your title confuses me.
auto input into alternating rows...
Are you trying to have some sort of default value that should alternate each time a record is inserted?
Or do you mean a yes/no field where you can only have 2 alternatives?
azemiops
05-12-2003, 03:43 PM
sorry i wasn't clear. I am trying to have some sort of default value that should alternate each time a record is inserted.
id | left_right |
------------------------
1 | left |
2 | right |
3 | left |
4 | right |
i solved my current dilema using a bit of PHP with:
if ($a&1){
}else{
}
but if I can use MySql in the future, there would be benefits.
thanks.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.