Customizing SMF > SMF Coding Discussion

Adding User to another dataabse on first login

(1/1)

Scotty1207:
I'm creating a little site which uses the SMF SSI.php for my users to login. However I want it to record this extra data in a different database. I was wondering first what would be the best to use to relate my users data with the username the id or the members_name and second how would I on the users first login to the little site (not the forum) to input either the id or members_name into several tables on a separate database from the one the smf users are placed?

Any help would be much appreciated.

emanuele:
I tend to prefer IDs to store in the database, less hassles. :P
Of course ask your users login with their IDs is not so fair... ;)

If the two databases are on the same server I think you can simply use the database name in the queries, for example:

--- Code: ---SELECT blabla
FROM `other_db_name`.table_name
ETC
--- End code ---
that should work.

Scotty1207:
Ok thanks I'll give it ago

Navigation

[0] Message Index

Go to full version