Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

location of address book files

Quote Reply
location of address book files
Where are the user's address book files? Say I want to copy addresses from one user to another, what files would I copy?

Thanks,

Bob


.:SEAWEAD:.

Last edited by:

baidarkabob: Apr 27, 2003, 9:50 AM
Quote Reply
Re: [baidarkabob] location of address book files In reply to
dbname_address table has the details of the user address book where dbname is the name of your GM database.
Quote Reply
Re: [anup123] location of address book files In reply to
Thanks anup.

Please advise on the procedure for importing tables from one Mysql DB to another.

Thanks very much.

BOb


.:SEAWEAD:.
Quote Reply
Re: [baidarkabob] location of address book files In reply to
Hi Bob,

If you're moving the addresses from one user to another, you would use an UPDATE query. (MySQL UPDATE Syntax)

Something like this *should* work:

Code:
UPDATE webmail_address
SET address_userid = 'new_user_id'
WHERE address_userid = 'old_user_id'

Your table prefix may be different.

NOTE: I did not test this. I would make a copy of the table and test it before running the query.

[edit]
Bob: Are you actaually moving the addresses from one database to another? If so, this query won't work for you.
[/edit]

Regards,
Charlie

Last edited by:

Chaz: Apr 28, 2003, 10:11 AM
Quote Reply
Re: [Chaz] location of address book files In reply to
Hi Charlie,

I think Bob wants to Copy the address book data of user1 to user2.

Would the following be OK?

Dump the address database with structure and data. Remove all the create/drop and all the inserts except for user1 in the dump file.

Change the user1 id to user2 id in the remaining dump file and finally Import the resulting data into address table.

I have an interesting question for FileMan for you which I shall be posting in the relevant forum. Please comment on the possibilities.

Thnx

Anup
Quote Reply
Re: [anup123] location of address book files In reply to
I just tested my query and it works as predicted. It updates the old user_id to the new user_id for all the users addresses in the address book. A single query seems like an awful lot less work to me than what you suggest :)

~Charlie
Quote Reply
Re: [Chaz] location of address book files In reply to
From Bob's Message
Quote:
Say I want to copy addresses from one user to another, what files would I copy

This would mean that user1 data should be added to user2 address book data while user1 still retains his/her address book data.

Update would mean that user1 loses his/her address book data if the id is being updated from 1 to 2.

Smile

Anup
Quote Reply
Re: [anup123] location of address book files In reply to
Ahh, yes, you're correct. I read that as move, not copy. Your way would work in the case of copy.

~Charlie
Quote Reply
Re: [Chaz] location of address book files In reply to
Thanks for the assistance fellas. I should clarify that I would like to move the data from a user in one database to a user in a different database. I have access to PHPmyadmin(Mysql4.0) or with some work i can get mysqlman to work.

Bob


.:SEAWEAD:.