所以我有这两个存储过程。第一个工作正常,但第二个不会。它仍然执行第一个。我试着评论其他人,除了第二个存储过程,它工作正常。我在这里做错了什么?如果elseif语句不工作php
if($view='group'){
$sql = "CALL sp_edit_biochem_group('$item_group_ID','$item_group_code','$item_group_desc','$item_group_qty','$uom','$location','$inv_by','$as_of_date')";
}
elseif ($view='breakdown'){
$sql = "CALL sp_edit_biochem_breakdown('$status','$as_of_date','$serial_no','$item_breakdown_ID')";
}
经典:使用'=='而不是'='。 '='赋值并且'=='比较值。另外请看“[Yoda条件](http://en.wikipedia.org/wiki/Yoda_Conditions)”以避免这些问题。 – insertusernamehere
如果您使用'=='而不是'='? – Floris
使用'=='而不是'=' – ashley