我能知道是什么原因让我得到错误的命令没有正确结束,因为我不确定代码中的错误
//calculating number of seats
$sqld="SELECT COUNT(sno) as seatAvialable FROM date WHERE date='$date' AND tcode='$tcode'";
$queryd=mysql_query($sqld);
$resultd=mysql_fetch_assoc($queryd);
if ($resultd['seatAvialable']>=44)
echo "No Available Seats left";
else
echo "seats Available= ".$queryd;
答案 0 :(得分:0)
Oracle不支持JOIN
子句中的DELETE
。因此,在DELETE中使用JOIN是您的查询的问题。
您需要更改查询以改为使用IN
或EXISTS
。
您可以使用以下查询 -
使用IN -
DELETE
FROM usernamepassword WHERE username IN
(SELECT email_address FROM faculty_admininfo
WHERE employee_id IN ('SCM-021232'));
使用EXISTS -
DELETE
FROM usernamepassword unpwd WHERE EXISTS
(SELECT 1 FROM faculty_admininfo info
WHERE info.email_address = unpwd.username
AND info.employee_id IN ('SCM-021232'));