Skip to content

Instantly share code, notes, and snippets.

@oroce
Created July 21, 2011 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oroce/1097327 to your computer and use it in GitHub Desktop.
Save oroce/1097327 to your computer and use it in GitHub Desktop.
sqlite db connection
/*
this file is in Resources/tabs/search.js
and the sqlite file is in Resources/db/imenetrend_new.sqlite
the database is called as "main"
*/
var db = Ti.Database.install( "../db/imenetrend_new.sqlite", "main" ),
letters = ( letters||"" ) + "%";
var rows = db.execute( "SELECT * FROM stations WHERE station_deaccent LIKE ? LIMIT 50", letters );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment