/ Published in: Rails

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
sql = ActiveRecord::Base.connection(); sql.execute("PRAGMA synchronous = OFF") sql.execute("BEGIN") sqlrequest = "INSERT INTO `products` VALUES(null,'"+title+"','"+cat1+"','"+cat2+"','"+ye+"','"+price+"');" sql.execute(sqlrequest) sql.execute("COMMIT") sql.execute("PRAGMA synchronous = NORMAL")
Comments
