onedumbcoder Posted December 14, 2008 Share Posted December 14, 2008 can someone please tell me why this is not working? "INSERT INTO forum_reply (post_id, replyer_id, reply) VALUES('$topic','$forumposter', '$reply') FROM forum WHERE '$userid' IN (SELECT user.id FROM forum_member, group_person WHERE forum_member.s_id='$id' AND group_person.s_id='$id' AND group_person.user_id='$uid')";" Quote Link to comment https://forums.phpfreaks.com/topic/136971-bad-query-when-trying-to-insert/ Share on other sites More sharing options...
lokie538 Posted December 14, 2008 Share Posted December 14, 2008 "INSERT INTO forum_reply (post_id, replyer_id, reply) VALUES('" . $topic . "','" . $forumposter' . ", '" . $reply . "') FROM forum WHERE '" . $userid . "' IN (SELECT user.id FROM forum_member, group_person WHERE forum_member.s_id='" . $id . "' AND group_person.s_id='" . $id . "' AND group_person.user_id='" . $uid . "')" Try that Quote Link to comment https://forums.phpfreaks.com/topic/136971-bad-query-when-trying-to-insert/#findComment-715423 Share on other sites More sharing options...
xtopolis Posted December 14, 2008 Share Posted December 14, 2008 The "FROM forum WHERE" looks odd to me. I haven't seen that syntax before.. is it valid? Quote Link to comment https://forums.phpfreaks.com/topic/136971-bad-query-when-trying-to-insert/#findComment-715437 Share on other sites More sharing options...
jordanwb Posted December 14, 2008 Share Posted December 14, 2008 The "FROM forum WHERE" looks odd to me. I haven't seen that syntax before.. is it valid? I have a feeling that its not. Quote Link to comment https://forums.phpfreaks.com/topic/136971-bad-query-when-trying-to-insert/#findComment-715444 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.