sql - If not found insert into -
i initate insert sql incase select not found. code far
res, err, errno, sqlstate = db:query("select * stream_session username = " .. quoted_user,0) if not res res1, err, errno, sqlstate = db:query("insert stream_session (username) values (" .. quoted_user .. ")") end
it checking if user exists it's not inserting incase user not found.
Comments
Post a Comment