Hum paul,
I putted by brain thinking and sinse I must have the same number of records
in dbmail_mailboxes and dbmail_subscription, I did:

---
replace into dbmail_subscription SELECT owner_idnr,mailbox_idnr FROM
dbmail_mailboxes order by owner_idnr,mailbox_idnr;
---

So this part is fixed, and I'm on 2.3x!





-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Jorge Bastos
Sent: domingo, 10 de Fevereiro de 2008 18:52
To: 'DBMail mailinglist'
Subject: RE: [Dbmail] DBMail 2.3.2 released

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Paul J Stevens
Sent: domingo, 10 de Fevereiro de 2008 18:38
To: DBMail mailinglist
Subject: Re: [Dbmail] DBMail 2.3.2 released


I checked myself. It is valid.

The first one should not return any rows. The second one is fine if it
returns rows. Those would just be mailboxes no-one subscribes to. And
no: you don't need to add rows for INBOXes for every user. Users cannot
unsubscribe from them anyway.

------
This is the answer to this below?

----
Paul!
Ok after a few time thinking... I know what made this.
I had the missing foreign keys that's a fact, but the problem of having
mailbox's without the it's corresponding value in the subscription, is from
my system to create email, I'm inserting values in:

Dbmail_users
Dbmail_aliases
Dbmail_mailboxes

And should be creating the dbmail_subscription .... damn!

Do you know any way to create the missing values in dbmail_subscription or
will I have to do it one by one?
----










Paul J Stevens wrote:
> Jorge Bastos wrote:
> 
>> But, I was checking and I have a lot of records without a mailbox, the
>> select I did was:
>>
>> ---
>> select *,(select count(*) from dbmail_mailboxes where
>> mailbox_idnr=mailbox_id) as tot from dbmail_subscription having tot=0; 
>> ---
>> And I have 286 records, that has no existing connection to
dbmail_mailboxes.
>> Can I safely delete this records from dbmail_subscriptions?
>>
>>
>> And for dbmail_mailboxes:
>> ---
>> select *,(select count(*) from dbmail_subscription where
>> mailbox_id=mailbox_idnr) as tot from dbmail_mailboxes having tot=0;
>> ---
>> I have 354 records that have no match in dbmail_subscription.
>>
>> My sql statements are correct, right?
>> What can I do with this?
> 
> Your sql smells funny. Is that valid JOIN syntax? If it is, I've never
> seen it before.
> 
> You better double check.
> 
> 
> 
> 
> 


-- 
  ________________________________________________________________
  Paul Stevens                                      paul at nfg.nl
  NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
  The Netherlands________________________________http://www.nfg.nl
_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

Reply via email to