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

Popular posts from this blog

sql - can we replace full join with union of left and right join? why not? -

javascript - Parallax scrolling and fixed footer code causing width issues -

iOS: Performance of reloading UIImage(name:...) -