userid@p>
) b ON a.ID = b.appid
where a.APPENABLED=1 and ((a.OWNTYPE=0 <@p p=" and %s" f="a.createuser=?">createuser@p>) or (a.OWNTYPE=1 and b.userid is not null))
ORDER BY a.ORDERVALUE ASC
]]>
userid@p>
) b ON a.ID = b.appid
LEFT JOIN (
SELECT
COUNT(userid) AS installCount,
appid
FROM
jcdp_chat_apps_my
GROUP BY
APPID
) c ON c.appid = a.id where a.APPENABLED=1 and a.ownType=1
ORDER BY a.ORDERVALUE ASC
]]>
userid,appid@p>)
VALUES(<@p f="?">userid,appid@p>)
]]>
userid@p>
<@p p=" and %s" f="appid=?">appid@p>
]]>