put backticks on mysql reseved words which we unfortunately used for row names a long time ago

This commit is contained in:
friendica 2013-08-27 21:30:45 -07:00
parent 7bb9289921
commit e8a0005d29

View file

@ -852,7 +852,7 @@ function photos_content(&$a) {
// fetch image, item containing image, then comments
$ph = q("SELECT aid,uid,xchan,resource_id,created,edited,title,desc,album,filename,type,height,width,size,scale,profile,photo_flags,allow_cid,allow_gid,deny_cid,deny_gid FROM `photo` WHERE `uid` = %d AND `resource_id` = '%s'
$ph = q("SELECT aid,uid,xchan,resource_id,created,edited,title,`desc`,album,filename,`type`,height,width,`size`,scale,profile,photo_flags,allow_cid,allow_gid,deny_cid,deny_gid FROM `photo` WHERE `uid` = %d AND `resource_id` = '%s'
and (photo_flags = %d or photo_flags = %d ) $sql_extra ORDER BY `scale` ASC ",
intval($owner_uid),
dbesc($datum),