PHP:
скопировать код в буфер обмена
скопировать код в буфер обмена
- $sql_osn = "
- SELECT chat_tema.id,chat_tema.id_user,chat_tema.tema, chat_tema.date, chat_tema.img,profile_user.name_user, profile_user.family_user
- FROM friends_iv,chat_tema,profile_user
- WHERE chat_tema.id NOT IN(':tems') AND (friends_iv.id_user_ot = ':id_us1' OR friends_iv.id_user_pol = ':id_us2') AND friends_iv.readed = 1
- AND ( (friends_iv.id_user_ot = ':id_us3' AND friends_iv.id_user_pol = chat_tema.id_user) OR (friends_iv.id_user_ot = chat_tema.id_user AND friends_iv.id_user_pol = ':id_us4' ) )
- AND profile_user.id = chat_tema.id_user
- ORDER BY chat_tema.id DESC LIMIT :cursor,20";