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

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

am 02.06.2006 22:31:00 von Greg Noss

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

Re: How do I pull info from one database to save in a session topush to a different DB

am 03.06.2006 07:13:39 von Aggro

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.

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

am 03.06.2006 08:14:45 von gordonb.yvqf5

>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

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

am 03.06.2006 10:47:15 von Greg Noss

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

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

am 03.06.2006 11:05:20 von Greg Noss

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.

Re: How do I pull info from one database to save in a session topush to a different DB

am 04.06.2006 08:36:43 von Aggro

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.