470,618 Members | 1,721 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,618 developers. It's quick & easy.

How do I pull info from one database to save in a session to push to a different DB

I'm building a dynamic site that has 3 data bases. One DB contains all
of my store info ID#, Name, Address, Phone. Another DB contains member
info ID, Name, address, email,phone,etc...
The 3rd DB Tracks when a user logs in and logs out at a store. This DB
has the following columns Store ID, Member ID, log in time,log out
time, time in store.

The stores log in in the morning that starts a session-I need the
session to pull the store's info ID#, Name,etc... so when a user logs
in, in the store. The login page inserts the store ID, Store name, and
user ID into the 3rd DB.

There are a lot of stores how do I get the store variables to be
inserted into the DB?

Thanks in advance,

Greg

Jun 2 '06 #1
5 1669
The Cool Geek wrote:
I'm building a dynamic site that has 3 data bases.
As I'm used to seen stupid solution in database design, the first
question is: Why?
And the second is: Is it possible to change it?
This DB
has the following columns Store ID, Member ID, log in time,log out
time, time in store.


Ok, this sounds like you are talking about an table. So I'm pretty much
confused. Do you know the difference between tables and databases and
are you sure you have 3 databases, not 3 tables in one database?

Answering to anything else is pointless before we know what you mean.
Jun 3 '06 #2
>I'm building a dynamic site that has 3 data bases. One DB contains all
of my store info ID#, Name, Address, Phone. Another DB contains member
info ID, Name, address, email,phone,etc...
Are we to assume that these 3 databases are at least potentially on
3 different hosts on 3 different continents under 3 different
administrations with 3 different operating systems with 3 different
database programs (e.g. MySQL, Oracle, and Postgres)?

Or do you mean that this data is in 3 different TABLES?
The 3rd DB Tracks when a user logs in and logs out at a store. This DB
has the following columns Store ID, Member ID, log in time,log out
time, time in store.

The stores log in in the morning that starts a session-I need the
session to pull the store's info ID#, Name,etc... so when a user logs
in, in the store. The login page inserts the store ID, Store name, and
user ID into the 3rd DB.
PAGE? Is there a web server involved in this? And when you talk about
"session", do you mean a login to the MySQL server, or a PHP-style
session at the web server?
There are a lot of stores how do I get the store variables to be
inserted into the DB?


You generally insert data into a SQL database with a SQL INSERT query.

Gordon L. Burditt
Jun 3 '06 #3

Gordon Burditt wrote:
I'm building a dynamic site that has 3 data bases. One DB contains all
of my store info ID#, Name, Address, Phone. Another DB contains member
info ID, Name, address, email,phone,etc...


Are we to assume that these 3 databases are at least potentially on
3 different hosts on 3 different continents under 3 different
administrations with 3 different operating systems with 3 different
database programs (e.g. MySQL, Oracle, and Postgres)?

Or do you mean that this data is in 3 different TABLES?
The 3rd DB Tracks when a user logs in and logs out at a store. This DB
has the following columns Store ID, Member ID, log in time,log out
time, time in store.

The stores log in in the morning that starts a session-I need the
session to pull the store's info ID#, Name,etc... so when a user logs
in, in the store. The login page inserts the store ID, Store name, and
user ID into the 3rd DB.


PAGE? Is there a web server involved in this? And when you talk about
"session", do you mean a login to the MySQL server, or a PHP-style
session at the web server?
There are a lot of stores how do I get the store variables to be
inserted into the DB?


You generally insert data into a SQL database with a SQL INSERT query.

Gordon L. Burditt


Jun 3 '06 #4
Sorry guys I really screwed this up. I'm new at this. I have 1 DB
with three tables. It is on a web server running MySQL and Php. When
the store logs in I would like to pull the store's info using a session
or a cookie. Then when the members check in and out the store's ID#,
Name, and address from the session/cookie are inserted into the table
with the member information in the same row. I can get the members
information into the table but the variable I'm trying to use for the
stores doesn't insert any data into the table.

Apologies and Thanks.

Jun 3 '06 #5
The Cool Geek wrote:
Sorry guys I really screwed this up. I'm new at this. I have 1 DB
with three tables. It is on a web server running MySQL and Php. When
the store logs in I would like to pull the store's info using a session
or a cookie. Then when the members check in and out the store's ID#,
Name, and address from the session/cookie are inserted into the table
with the member information in the same row. I can get the members
information into the table but the variable I'm trying to use for the
stores doesn't insert any data into the table.


I'm still confused about the terms you use.

Is your problem that a query is failing? If so, what is the query and
what is the error message MySQL is producing from it.

If you don't know if the query is failing, check the result values from
php functions. By checking them you should find out what function call
fails to pinpoint the problem.
Jun 4 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Jeronimo Bertran | last post: by
6 posts views Thread by MattC | last post: by
6 posts views Thread by matt | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.