sql<<"SELECT title,descrition,id FROM content WHERE title @@ to_tsquery('"<<word<<"') OR descrition @@ to_tsquery('"<<word<<"') OR text @@ to_tsquery('"<<word<<"');";
sql<<"SELECT title,descrition,id FROM content WHERE title @@ to_tsquery('"<<sql.escaped(buf,word)<<"') OR descrition @@ to_tsquery('"<<sql.escaped(buf,word)<<"') OR text @@ to_tsquery('"<<sql.escaped(buf,word)<<"');";
@@ -386,7 +386,7 @@ void blogi::StaticPage::Search(const int tid, const char* word, blogi::SearchRet
blogi::SQLsql;
blogi::DBResultres;
sql<<"SELECT id,url,meta,text FROM static_content WHERE text @@ to_tsquery('"<<word<<"') OR meta @@ to_tsquery('"<<word<<"');";
sql<<"SELECT id,url,meta,text FROM static_content WHERE text @@ to_tsquery('"<<sql.escaped(buf,word)<<"') OR meta @@ to_tsquery('"<<sql.escaped(buf,word)<<"');";