من کد زیر را در لوکال هاست اجرا میکنم و هیچ مشکلی نیست اما در سرور با اینکه آپاچی و phpMyAdmin بروز تر است خطای زیر را میدهد.

Error

SQL query:

INSERT INTO `message` (`profile_id`,`subject`)
SELECT 1,test
WHERE
EXISTS (SELECT 1 FROM `profile` WHERE `id` = 1)
MySQL said:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE
EXISTS (SELECT 1 FROM `profile` WHERE `id` = 1)' at line 3



INSERT INTO `message` (`profile_id`,`subject`)
SELECT :id,:subject
WHERE EXISTS (SELECT 1 FROM `profile` WHERE `id` = :id)