insert into URLLOGS (DATE,IP,DNS,GWIP,GWDNS,CATEGORY,SUBCAT,ACCESSTYPE,QUERY,IDFIELD,IDSEC,IDUSER,SID,COUNTRYCODE,REFERRER)
values (NOW(),60161765,'ec2-3-149-254-229.us-east-2.compute.amazonaws.com',0,'','CONTACTS','AUDIT',3,'idrecmsg=50923',0,0,0,'884c057b57b1830a18824d65d763dac6','US','') |
select distinct PR.DISPLAYNAME as RECIPIENT,MS.BODY,RC.IDMESSAGE,PRS.DISPLAYNAME as SENDER,RC.IDCONTACT,CT.CONTACT,ADDRESS,MS.DATE,METHOD,PARTS,SUBMITED,TC.VALUE as TELCOP from RECIPIENTS RC left join SVOLAVADLO SV on SV.IDSVOL=RC.IDSVOL left join PERSONS PR on PR.IDPERSON=SV.IDPERSON left join MESSAGES MS on MS.IDMESSAGE=RC.IDMESSAGE left join SVOLAVADLO SVS on SVS.IDSVOL=MS.IDSVOL left join PERSONS PRS on PRS.IDPERSON=SVS.IDPERSON left join CONTACTS CT on CT.IDCONTACT=RC.IDCONTACT left join `VALUES` TC on TC.IDVALUE=CT.IDTELCOP where RC.IDRECMSG=50923 |
select CONFIRMED,to_days(NOW())-to_days(CA.CREATED) as DAYS,SIGN from CONTAUDITS CA left join USERS US on US.IDUSER=CA.CREATOR left join PERSONS PR on PR.IDPERSON=US.IDPERSON where CA.IDCONTACT=1163 order by CA.CREATED desc limit 0,1 |