RE: Create account with two databases
cannuck1964 <[email protected]>
| Newsgroups | gmane.comp.web.oscommerce.devel |
|---|---|
| Message-ID | <45e819f901bfd98557c7d01b064c0fac@osCommerce-Forums> |
This message was sent from: Development
http://forums.oscommerce.com/viewtopic.php?p=163867#163867
----------------------------------------------------------------
Hi there,
I would suggest you do a complete insert of the customer info into the store tables prior to switching to the second db....
[quote]tep_db_connect('database_server_name', 'database_user_name', 'user_password', 'database_name') or die('Unable to connect to database server!');
tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);
tep_db_connect() or die('Unable to connect to database server!');
tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);
$customer_id = tep_db_insert_id(); [/quote]
in this example, [b]$customer_id = tep_db_insert_id();[/b] is set for the first db, but not for the second, this is necessary for both insertions for the different db....
how I would set it up.....
insert customers data for the first db.....complete this fully.....
add data into second db.......
then carry on with the switching of cart contents into the new account holders cart....
I hope this helps some.....I will still watch this thread if you have problems....
cheers,