Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Displaying data via user generated SQL at runtime

By: a guest on Mar 22nd, 2012  |  syntax: None  |  size: 0.26 KB  |  views: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. var db = Database.Open("bakery");
  2. var p = db.Query("SELECT * FROM PRODUCTS"); // This returns a list of products
  3.        
  4. var db = Database.Open("TDL");
  5. var selectQueryString = "SELECT * FROM Articles WHERE slug = @0";
  6. var show =  db.QuerySingle(selectQueryString, slug);