insætter 2 ganger i mysql?
jeg har et forum, som bugger lidt, den insætter reply 2 gange i DB hvis tiden skifter. kan være i mysql setup af DB (hvis man kan ændre sådan noget der?)<%
REM posts = sat tideligere ud fra bruger DB
SQL ="SELECT * FROM "& replace(replace(domain,".","_"),"-","_") &"_forum_forum WHERE ( forum_id = '"& request.QueryString("replyid") &"') "
Set RS = Conn.Execute( SQL )
uSQL = "UPDATE "& replace(replace(domain,".","_"),"-","_") &"_forum_forum SET "
uSQL = uSQL & " f_last_post = '"& now &"' ,"
uSQL = uSQL & " f_last_post_author = '"& session("login") &"' "
uSQL = uSQL & " WHERE forum_id ='"& request.QueryString("replyid") &"'"
Conn.Execute( uSQL )
uSQL = "UPDATE "& replace(replace(domain,".","_"),"-","_") &"_users SET "
uSQL = uSQL & " forum_posts = '"& posts &"' "
uSQL = uSQL & " WHERE username ='"& session("login") &"'"
Conn.Execute( uSQL )
SQL = "INSERT INTO "& replace(replace(domain,".","_"),"-","_") &"_forum_reply (cat_id,forum_id,f_post_author,f_post,f_description) VALUES ('"& RS("cat_id") &"','"& request.QueryString("replyid") &"','" & session("login") & "','" & now & "','" & post(request.form("txtContent")) & "')"
Conn.Execute( SQL )
%>
OUTPUT:
SELECT * FROM incredible_dk_forum_forum WHERE ( forum_id = '6')
UPDATE incredible_dk_users SET forum_posts = '14' WHERE username ='incredible'
INSERT INTO incredible_dk_forum_reply (cat_id,forum_id,f_post_author,f_post,f_description) VALUES ('1','6','incredible','2011-2-27 17:47:57','teksten jeg skriver er denne')