more backquotes - this should take care of most except for the array import queries

This commit is contained in:
zotlabs
2016-10-09 16:31:04 -07:00
parent 2bdf135cbc
commit e7233c0c94
30 changed files with 66 additions and 67 deletions

View File

@@ -214,13 +214,13 @@ function widget_savedsearch($arr) {
$search = ((x($_GET,'search')) ? $_GET['search'] : '');
if(x($_GET,'searchsave') && $search) {
$r = q("select * from `term` where `uid` = %d and `ttype` = %d and `term` = '%s' limit 1",
$r = q("select * from term where uid = %d and ttype = %d and term = '%s' limit 1",
intval(local_channel()),
intval(TERM_SAVEDSEARCH),
dbesc($search)
);
if(! $r) {
q("insert into `term` ( `uid`,`ttype`,`term` ) values ( %d, %d, '%s') ",
q("insert into term ( uid,ttype,term ) values ( %d, %d, '%s') ",
intval(local_channel()),
intval(TERM_SAVEDSEARCH),
dbesc($search)
@@ -229,7 +229,7 @@ function widget_savedsearch($arr) {
}
if(x($_GET,'searchremove') && $search) {
q("delete from `term` where `uid` = %d and `ttype` = %d and `term` = '%s'",
q("delete from term where uid = %d and ttype = %d and term = '%s'",
intval(local_channel()),
intval(TERM_SAVEDSEARCH),
dbesc($search)
@@ -256,7 +256,7 @@ function widget_savedsearch($arr) {
$o = '';
$r = q("select `tid`,`term` from `term` WHERE `uid` = %d and `ttype` = %d ",
$r = q("select tid,term from term WHERE uid = %d and ttype = %d ",
intval(local_channel()),
intval(TERM_SAVEDSEARCH)
);