https://www.icyphoenix.com/viewtopic.php?f=26&t=2457&p=17728#p17728
-----------------------------------
nims
Sun 15 Jul, 2007 12:18

Re: User Personal Galleries Page Customization
-----------------------------------
I am getting this error
[code linenumbers=false]SQL error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND p.pic_id = AND ct.cat_view_level IN ('-1','0','1','2','3') ORDER BY p' at line 5

SELECT ct.cat_id, ct.cat_view_level, p.pic_id, p.pic_title, p.pic_desc, p.pic_time FROM phpbb_album AS p LEFT JOIN phpbb_album_cat AS ct ON p.pic_cat_id = ct.cat_id WHERE p.pic_user_id = AND p.pic_id = AND ct.cat_view_level IN ('-1','0','1','2','3') ORDER BY p.pic_id desc LIMIT 1 [/code]
in file [b]album_personal_index.php[/b]

for this query
[code linenumbers=false]$sql = "SELECT ct.cat_id, ct.cat_view_level, p.pic_id, p.pic_title, p.pic_desc, p.pic_time
			FROM ". ALBUM_TABLE ." AS p
					LEFT JOIN ". ALBUM_CAT_TABLE ." AS ct ON p.pic_cat_id = ct.cat_id
			WHERE p.pic_user_id = " . $user_id ."
			AND p.pic_id = " . $memberrow[$i]['last_pic'] . "
			AND ct.cat_view_level IN ($cat_view_level)
			ORDER BY p.pic_id desc
			LIMIT 1
			";[/code]
Can you help.


