insert into URLLOGS (DATE,IP,DNS,GWIP,GWDNS,CATEGORY,SUBCAT,ACCESSTYPE,QUERY,IDFIELD,IDSEC,IDUSER,SID,COUNTRYCODE,REFERRER)
values (NOW(),59834310,'ec2-3-144-255-198.us-east-2.compute.amazonaws.com',0,'','CONTACTS','AUDIT',3,'idrecmsg=50871',0,0,0,'893f8f098206f7e6cf00d532a4ace438','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=50871 |
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=1166 order by CA.CREATED desc limit 0,1 |