/    Sign up×
Community /Pin to ProfileBookmark

How to reconcile two files of different tables and databases

I installed a newsletter script with these fields in a table: ’email’ and ‘Email’ that have identical values.

I need to reconcile the values of two fields from different tables and databases by removing entries of one db upon change of values at the other table. I’m familiar to MySQL commands but not skillful with PHP.

In one table (users) and database (one)
[INDENT] MemberId
UserName
PassWord
Email[/INDENT]
in another table (members) of another database (two)

[INDENT]id
email
confirmed[/INDENT]

[COLOR=Green]If the value of the field ‘confirmed’ of db_two tbl_two changes from its default one, then the entry of the MemberId of the tbl_users of db_one is removed if Email/user/one matches email/members/two.
[/COLOR]

Can a php script update the first db if I simply open it from an Internet browser?

Would it be a loop that goes through every ‘id’ entry of the db two and that checks the value of the field ‘confirmed’ for every matched ’email’ and removes the entry ‘MemberId’ of the db one?

Thank you.

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@NogDogJul 07.2006 — The best solution would be to have the script that updates the confirmed value in table 2 to then delete any applicable entry from table 1. Otherwise, as the number of confirmed entries in table 2 grows, you'd be checking for more and more email addresses in table 1 that have already been deleted.
Copy linkTweet thisAlerts:
@wtopaauthorJul 07.2006 — The best solution would be to have the script that updates the confirmed value in table 2 to then delete any applicable entry from table 1. Otherwise, as the number of confirmed entries in table 2 grows, you'd be checking for more and more email addresses in table 1 that have already been deleted.[/QUOTE] Understood. I'll take a lot at the bit that updates the value. Thank you.
×

Success!

Help @wtopa spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...