Hi all,
I have created inbox, sent and Trash......now
The deleted items in inbox is going to trash,,,,i mean i written the query only concerned with inbox......but now i want the deleted items of sent should also go to trash......
how can i write that query...........

I have written like this for inbox deleted items

$selcount = "SELECT * FROM autoalto_mail where flag='1' " ;

so what sent .......pls help me out.......

set your flag field according to your requirement, means when you clicked on the delete make your flag to 1,then the message is under trash...
Explanation:
when user send one message ,then insert it into messages table with flag=0,then when in inbox ,write your query with where clause is where flag=0...and when user deletes that,make your flag to be 1,then it is under trash....
try this and notify if any error comes...

HI
is this correct.

SELECT * FROM autoalto_mail as a1, autoalto_contractor_sentitems as a2 where a1.flag='1'=a2.flag

that is not correct..
see the following is correct:

SELECT * FROM autoalto_mail as a1, autoalto_contractor_sentitems as a2 where a1.flag='1' and a2.flag='1'