To get a list of channels a user is on, whether the channel has +p or +s, and what that users status is on each channel using their nick you would use this query:
SELECT chan.channel, chan.mode_lp, chan.mode_ls, ison.* FROM chan, ison, user WHERE ison.chanid = chan.chanid AND ison.nickid = user.nickid AND user.nick = '<nick>' ORDER BY chan.channel;
If you know the nickid (eg you have already retrieved it) you can shorten that to:
SELECT chan.channel, chan.mode_lp, chan.mode_ls, ison.* FROM chan, ison WHERE ison.chanid = chan.chanid AND ison.nickid = <nickid> ORDER BY chan.channel;