Subject: | Error in documentation |
Date: | Sun, 10 Nov 2013 21:12:44 +0000 |
To: | "bug-DBD-SQLite [...] rt.cpan.org" <bug-DBD-SQLite [...] rt.cpan.org> |
From: | Felix Li <felix.li.tfbo [...] statefarm.com> |
Hi,
I think there are two errors in
Here is a very short example of using FTS : (Short introduction to FTS)
$dbh->do(<<"") or die DBI::errstr;
CREATE VIRTUAL TABLE fts_example USING fts4(content)
my $sth = $dbh->prepare("INSERT INTO fts_example(content) VALUES (?))");
$sth->execute($_) foreach @docs_to_insert;
my $results = $dbh->selectall_arrayref(<<"");
SELECT docid, snippet(content) FROM fts_example WHERE content MATCH 'foo'
I think that
my $sth = $dbh->prepare("INSERT INTO fts_example(content) VALUES (?))");
should be
my $sth = $dbh->prepare("INSERT INTO fts_example(content) VALUES (?)");
and
SELECT docid, snippet(content) FROM fts_example WHERE content MATCH 'foo'
should be
SELECT docid, snippet(fts_example) FROM fts_example WHERE content MATCH 'foo'
Thanks!