When looking at the trace, it seems to go through the motions of binding the param, but doesn't.my $blogTagToShow = shift; my $dbh = DBI->connect("dbi:SQLite:dbname=$db"); $dbh->trace(4); my $query = "SELECT * FROM tblBlogPosts WHERE fldTags LIKE '%?%' ORDER + BY fldDate DESC"; my $sth = $dbh->prepare($query); $sth->bind_param(1, $blogTagToShow); $dbh->trace(0);
Anyone got any ideas ? Cheers!, Davesqlite trace: prepare statement: SELECT * FROM tblBlogPosts WHERE fldT +ags LIKE '%?%' ORDER BY fldDate DESC at dbdimp.c line 258 <- prepare= DBI::st=HASH(0x93bba20) at Libraries//libBlog.pm line +42 via at index.pl line 152 -> bind_param for DBD::SQLite::st (DBI::st=HASH(0x93bba20)~0x93b64 +ec 1 'windows') sqlite trace: bind into 0x93b6504: 1 => windows (0) pos 0 at dbdimp.c line 464 <- bind_param= 1 at Libraries//libBlog.pm line 43 via at index.pl + line 152 -> trace for DBD::SQLite::db (DBI::db=HASH(0x93b62dc)~0x93b627c 0) <- trace= 4 at Libraries//libBlog.pm line 45 via at index.pl line + 152 -> execute for DBD::SQLite::st (DBI::st=HASH(0x93bba20)~0x93b64ec) sqlite trace: execute at dbdimp.c line 325 sqlite trace: Execute returned 6 cols
In reply to DBI:SQLite bind_param problem by davehope
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |