2つのスクリプトがあります。1つは挿入用、もう1つは更新用です。
私の更新ボタンスクリプトは、挿入された最新のIDを使用しており、次のようになります。
Update tblsurvey
set WouldLikeToBeSeenOnSite = 'sadffas'
and DislikedOnSite = 'asdfsadfsadf'
and OtherNewsWebsitesRead = 'asdfsadfa'
and LikedOnOtherNewsSites = 'asdfsadfas'
and IPAddress = '172.16.0.123'
and DateAnswered = current_date()
where SurveyResponseId in (select max(SurveyResponseId) from tblsurvey);
どうやら、「where」句はエラーを生成します:
1093 - you cant specify target table 'tblsurvey' for update in FROM clause.
更新している同じテーブルの最新の挿入IDを使用できる他の方法はありますか?
ありがとう。