clean up some sql errors from the logs
This commit is contained in:
parent
62afdf3820
commit
ce95b1f68c
@ -31,7 +31,7 @@ function group_add($uid,$name) {
|
|||||||
$dups = false;
|
$dups = false;
|
||||||
$hash = random_string() . $name;
|
$hash = random_string() . $name;
|
||||||
|
|
||||||
$r = q("SELECT id FROM group WHERE hash = '%s' LIMIT 1", dbesc($hash));
|
$r = q("SELECT id FROM `group` WHERE hash = '%s' LIMIT 1", dbesc($hash));
|
||||||
if($r)
|
if($r)
|
||||||
$dups = true;
|
$dups = true;
|
||||||
} while($dups == true);
|
} while($dups == true);
|
||||||
|
@ -137,7 +137,7 @@ function poco_load($xchan = null,$url = null) {
|
|||||||
}
|
}
|
||||||
logger("poco_load: loaded $total entries",LOGGER_DEBUG);
|
logger("poco_load: loaded $total entries",LOGGER_DEBUG);
|
||||||
|
|
||||||
q("delete from xlink where xlink_xchan = '%s' and xlink_updated` < UTC_TIMESTAMP() - INTERVAL 2 DAY",
|
q("delete from xlink where xlink_xchan = '%s' and xlink_updated < UTC_TIMESTAMP() - INTERVAL 2 DAY",
|
||||||
dbesc($xchan)
|
dbesc($xchan)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -146,7 +146,7 @@ function poco_load($xchan = null,$url = null) {
|
|||||||
function count_common_friends($uid,$xchan) {
|
function count_common_friends($uid,$xchan) {
|
||||||
|
|
||||||
$r = q("SELECT count(xlink_id) as total from xlink where xlink_xchan = '%s' and xlink_link in
|
$r = q("SELECT count(xlink_id) as total from xlink where xlink_xchan = '%s' and xlink_link in
|
||||||
(select abook_chan from abook where abook_xchan != '%s' and abook_channel = %d and abook_flags = 0 )",
|
(select abook_xchan from abook where abook_xchan != '%s' and abook_channel = %d and abook_flags = 0 )",
|
||||||
dbesc($xchan),
|
dbesc($xchan),
|
||||||
dbesc($xchan),
|
dbesc($xchan),
|
||||||
intval($uid)
|
intval($uid)
|
||||||
@ -166,7 +166,7 @@ function common_friends($uid,$xchan,$start = 0,$limit=100000000,$shuffle = false
|
|||||||
$sql_extra = " order by xchan_name asc ";
|
$sql_extra = " order by xchan_name asc ";
|
||||||
|
|
||||||
$r = q("SELECT * from xchan left join xlink on xlink_xchan = xchan_hash where xlink_xchan = '%s' and xlink_link in
|
$r = q("SELECT * from xchan left join xlink on xlink_xchan = xchan_hash where xlink_xchan = '%s' and xlink_link in
|
||||||
(select abook_chan from abook where abook_xchan != '%s' and abook_channel = %d and abook_flags = 0 ) $sql_extra limit %d, %d",
|
(select abook_xchan from abook where abook_xchan != '%s' and abook_channel = %d and abook_flags = 0 ) $sql_extra limit %d, %d",
|
||||||
dbesc($xchan),
|
dbesc($xchan),
|
||||||
dbesc($xchan),
|
dbesc($xchan),
|
||||||
intval($uid),
|
intval($uid),
|
||||||
|
Reference in New Issue
Block a user