Re: [sqlite] Insert not working for sqlite3

2011-07-10 Thread Simon Slavin
On 11 Jul 2011, at 1:41am, James_21th wrote: > I ran exactly the code you put below, but it only return: bool(false) > > try { > $dbh = new PDO('sqlite:db1.db'); > $result=$dbh->query("drop table if exists tbl2"); > $result=$dbh->query("create table tbl2 (one varchar(10),two varchar(10));");

Re: [sqlite] Insert not working for sqlite3

2011-07-10 Thread James_21th
Hi, I ran exactly the code you put below, but it only return:  bool(false) query("drop table if exists tbl2"); $result=$dbh->query("create table tbl2 (one varchar(10),two varchar(10));"); var_dump($result); } catch(PDOException $e) {   print "Oops!\n";   print 'Exception :

Re: [sqlite] getting list of column names

2011-07-10 Thread e-mail mgbg25171
> > http://www.sqlite.org/pragma.html#pragma_table_info > I wasn't aware of that. Thank you very much! ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Storing/editing hierarchical data sets

2011-07-10 Thread Petite Abeille
On Jul 10, 2011, at 9:41 PM, Black, Michael (IS) wrote: > Somebody smarter than I may be able to figure out how to use views to do the > upper levels. Was there a question hidden somewhere in your post? :) ___ sqlite-users mailing list

Re: [sqlite] Storing/editing hierarchical data sets

2011-07-10 Thread Black, Michael (IS)
Somebody smarter than I may be able to figure out how to use views to do the upper levels. But if you can afford your database to be a bit less then twice as big just use tables. create table level1(id int,l int,r int); insert into level1 values(1,251,18); insert into level1 values(2,5,91);

Re: [sqlite] using index when using concatination

2011-07-10 Thread Igor Tandetnik
Black, Michael (IS) wrote: > 3.7.4 doesn't indicate it will use an index in either case with like...but > glob seems to call the index...why does glob use the > index but like does not? LIKE is case-insensitive by default, while GLOB is case-sensitive. Thus, LIKE works

Re: [sqlite] getting list of column names

2011-07-10 Thread Petite Abeille
On Jul 10, 2011, at 8:41 PM, e-mail mgbg25171 wrote: > Is there a better way to do this? pragma table_info http://www.sqlite.org/pragma.html#pragma_table_info ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] getting list of column names

2011-07-10 Thread e-mail mgbg25171
Here's what I'm doing to get a list of column names as a first step in my "add column" routine. I see that limit 1 isn't limiting the output to the first row ie the column names... like it did when I used SQLitening. Is there a better way to do this? Any advice much appreciated. int

Re: [sqlite] using index when using concatination

2011-07-10 Thread Black, Michael (IS)
I upgraded to 3.7.1.1 and tested this...glob works wonderfully...especially when there are few hits it makes a huge difference since it uses the index. I don't see why like shouldn't be using the index in these cases as that's what the docs appear to say it should do. A%A meets the

[sqlite] Storing/editing hierarchical data sets

2011-07-10 Thread Christopher Melen
Hi, I am developing an application which analyses audio data, and I have recently been looking into Sqlite as a possible file format. The result of an analysis in my application is a hierarchical data set, where each level in the hierarchy represents a summary of the level below, taking the

Re: [sqlite] System.Data.SQLite Reserved Words Bug

2011-07-10 Thread Patrick Earl
Thanks for fixing that so quickly. Looking forward to a new release. Patrick Earl On Sat, Jul 9, 2011 at 2:39 PM, Joe Mistachkin wrote: > > Patrick Earl wrote: >> >> System.Resources.MissingManifestResourceException was unhandled >>   Message=Could not find any

Re: [sqlite] using index when using concatination

2011-07-10 Thread Black, Michael (IS)
3.7.4 doesn't indicate it will use an index in either case with like...but glob seems to call the index...why does glob use the index but like does not? sqlite> create table words(word text); sqlite> create index idx on words(word); sqlite> explain query plan select * from words where "word"

[sqlite] SQliteClass project is still alive

2011-07-10 Thread Giuseppe Luciano
SqliteClass an SQLite C++ wrapper is still alive, but the developping is in stand by Project page: https://sites.google.com/site/lucianogiuseppeprogrammi/materiale-universita/c/sqliteclass ___ sqlite-users

Re: [sqlite] using index when using concatination

2011-07-10 Thread Igor Tandetnik
Baruch Burstein wrote: > I am using the following SQL statement for SQLite: > >select * from words where "word" like ? || '%' || ? ; > > In order to bind parameters to the first and last letters. I have tested > this both with and without an index on the column `word`,

Re: [sqlite] using index when using concatination

2011-07-10 Thread Igor Tandetnik
Igor Tandetnik wrote: > Black, Michael (IS) wrote: >> Any particular reason you can't build your own string and just pass one >> parameter? >> >> select * from words where "word" like ?; > > That won't help - SQLite still can't use the index. I

Re: [sqlite] using index when using concatination

2011-07-10 Thread Igor Tandetnik
Black, Michael (IS) wrote: > Any particular reason you can't build your own string and just pass one > parameter? > > select * from words where "word" like ?; That won't help - SQLite still can't use the index. > And any reason why you don't create a 2nd field holds

Re: [sqlite] using index when using concatination

2011-07-10 Thread Black, Michael (IS)
Any particular reason you can't build your own string and just pass one parameter? select * from words where "word" like ?; And any reason why you don't create a 2nd field holds the 1st and last char? and index that? Then your query should be blazingly fast as it will actually use the index

[sqlite] using index when using concatination

2011-07-10 Thread Baruch Burstein
I am using the following SQL statement for SQLite: select * from words where "word" like ? || '%' || ? ; In order to bind parameters to the first and last letters. I have tested this both with and without an index on the column `word`, and the results are the same. However, when running the

Re: [sqlite] Sqlite help

2011-07-10 Thread Jan Hudec
On Tue, Jul 05, 2011 at 00:30:31 +0200, Wolfgang Enzinger wrote: > Am Mon, 4 Jul 2011 14:45:07 -0700 (PDT) schrieb ceekayCK: > > unfortunately send me a .doc file > > You're at a loss there. Your friend could as well print this file and send > you the printer output, essentially that would make