Mistři v programování na #hovnokod

PHP #180

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('wrong status');
}

Anonymous,