![]() |
PHP Get data from multi table
i'm working on ERP Solutions and want to inform if any one have unread notification and i want send one email daily if anyone not read notification. one email in one day each member who have unread notifications.
My Query "select n.*, i.* from ew_notifications n, ew_inform i where n.authorid<>i.authorid and i.senddate<>'$todatdate' " if($resords>0){ insert into ew_inform (authorid, senddate) value('{$resords['authorid']}', '$todatdate') } error this my query showing again tha member that exiting in ew_inform table i just want that pplz come who dont exsit in ew_inform table in current date |
I can't make heads or tales of how the tables you provided are constructed to give you an accurate query, but if you are looking to query 2 tables you usually use a LEFT JOIN.
PHP Code:
Now I get the sense that you may be checking if one table doesn't have a particular "authorid" with today's date. If that is the case I believe 2 query will be needed. |
| All times are GMT. The time now is 03:36 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0