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

php - How to add and update images or image url in Volusion using Volusion API -

Laravel mail error `Swift_TransportException in StreamBuffer.php line 269: Connection could not be established with host smtp.gmail.com [ #0]` -

C#.NET Oracle.ManagedDataAccess ConfigSchema.xsd -