我正在使用 php 并希望在 oracle 的一个语句中运行两个更新查询。
$x = strtolower($x);
$ore = getOreType($x); //returns ore type as string
$newTotal = getMined($ore)-($x_value*$weight); //adds existing ore quantity to additional quantity
$newTotalComp = $x_value + getComponentQuantity($x); //adds existing component quantity to additional quantity
$query = "UPDATE Material SET quantity=$newTotal WHERE name='$ore'; UPDATE Component SET quantity=$newTotalComp WHERE name='$x'";
$statement = ociparse($conn, $query);
oci_execute($statement);
oci_free_statement($statement);
我在 oci_execute 上收到以下错误......
oci_execute(): ORA-00911: invalid character
是否可以在同一个语句中运行两个更新?它适用于 Oracle SQL Developer。
塔