shonir Posted August 10, 2011 Share Posted August 10, 2011 im working a online php software for domain management system. now below is all information for exactly what i can do 1) table tbl_expiration_notice all domains stores in this table with expiration date. -------fields id = 5 title = sarking.com type = 3 expirytime = 1315797147 _________________ 2) table {tbl}noticetype all domain notification type mean some domains only register with us and some domain have hosting also with us and some domains only hosted 1)hosting 2)domain 3)domain+hosting -------fields id = 3 title = domain+hosting _______________________ 3)table {tbl}mailtemp all notice type have multi templates like one domain is going expire client will received 3 email. -------fields id = 1 parentid = 3 days = 60 subject = domain expire notice message = your domain will be expire soon ________________________ 4)table {tbl}noticelogs in this table we will store all sent mail notice so next time we will not repeat email. -------fields id = 10 noticeid = 5 mailid = 1 ___________________________ my code $shonirresult = $sm->shonirqueryfnc("select en.*, nt.*, mt.*, nl.*, en.id as en_id, en.title as en_title, mt.id as mt_id from {tbl}expiration_notice en, {tbl}noticetype nt, {tbl}mailtemp mt, {tbl}noticelogs nl where en.type=nt.id and nt.id=mt.parentid and en.expirytime<($shonirvartime+(".(60*60*24)."*mt.d ays)) and (nl.noticeid<>en.id and nl.mailid<>mt.id ) ", 'Get Expiration Notice Result'); $shonirrows = $sm->shonirrowsfnc($shonirresult, 'Get Expiration Notice Rows'); if($shonirrows>0){ $shonirrecords = $sm->shonirrecordsfnc($shonirresult, 'Get Expiration Notice Records'); echo date("m/d/Y", ($shonirvartime)).'<br/>' ; echo $shonirrecords['en_title'].'<br/>'; $sm->shonirqueryfnc("insert into {tbl}noticelogs (noticeid, mailid, addtime) value({$shonirrecords['en_id']}, {$shonirrecords['mt_id']}, $shonirvartime) ", 'Insert Notice Log Record'); } problems is function show sarking.com again even i add there function if not exit in noicelog table then show. (nl.noticeid<>en.id and nl.mailid<>mt.id ) i dont know why its not working :'( thanks in advance for your consideration Quote Link to comment https://forums.phpfreaks.com/topic/244450-fetching-record-from-multipul-tables-and-making-domain-expire-alerts/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.