- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
switch ($status){
case STATUS_WAIT:
$sql='UPDATE orders SET status=\''.STATUS_WAIT.'\' WHERE id='.$id;
break;
case STATUS_ACCEPT:
$sql='UPDATE orders SET status=\''.STATUS_ACCEPT.'\' WHERE id='.$id;
break;
case STATUS_ORDER:
$sql='UPDATE orders SET status=\''.STATUS_ORDER.'\' WHERE id='.$id;
break;
case STATUS_CANCEL:
$sql='UPDATE orders SET status=\''.STATUS_CANCEL.'\' WHERE id='.$id;
break;
default: $this->addError('недопустимый статус');
}