This one time, at band camp, Justin Patrin <[EMAIL PROTECTED]> wrote:
> On Wed, 18 Aug 2004 11:03:47 -0300, Ricardo Cezar <[EMAIL PROTECTED]> wrote:
> > Probably it's a dumb question, but I'm new to OO Programming, so...
> >
> > How can I store the instance of the class in the session
> >
>
On Wed, 18 Aug 2004 11:03:47 -0300, Ricardo Cezar <[EMAIL PROTECTED]> wrote:
> Probably it's a dumb question, but I'm new to OO Programming, so...
>
> How can I store the instance of the class in the session
>
I answered this a long time ago in this thread. Did you not get my mail?
> Thanks
"Ricardo Cezar" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Probably its a dumb question, but Im new to OO Programming, so...
>
> How can I store the instance of the class in the session
>
> Thanks,
> Rics
That's no different to storing any other variable into the session:
Probably its a dumb question, but Im new to OO Programming, so...
How can I store the instance of the class in the session
Thanks,
Rics
"Thomas Goyne" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
> On Tue, 17 Aug 2004 12:25:42 -0600, Jed R. Brubaker <[EMAIL PROTECTED]>
On Tue, 17 Aug 2004 12:25:42 -0600, Jed R. Brubaker <[EMAIL PROTECTED]>
wrote:
The real reason for having the login class like this is to eliminate
database calls. I thought I could have one session variable that said yo
uwere logged in, but then the database calls would still have to be made
i think for the ease of use, 1 db call per page is minimal, especially
sinse we are talking about some small fields here. THe db is local to
the webserver, so really, whats the problem.
Jason
"Ed Lazor" <[EMAIL PROTECTED]> wrote:
>
> > -Original Message-
> > I don't know - is it?
>
>
> -Original Message-
> I don't know - is it?
I would think so. It's optimized for speed on small data sets. Does anyone
else have an opinion on this?
-Ed
>
>
> "Ed Lazor" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > > -Original Message-
> > > > The
I don't know - is it?
"Ed Lazor" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > -Original Message-
> > > The real reason for having the login class like this is to eliminate
> > > database calls. I thought I could have one session variable that said
yo
> > > uwere logged
> -Original Message-
> > The real reason for having the login class like this is to eliminate
> > database calls. I thought I could have one session variable that said yo
> > uwere logged in, but then the database calls would still have to be made
> on
> > each page.
Playing Devil's Advoca
On Tue, 17 Aug 2004 12:03:56 -0600, Jed R. Brubaker
<[EMAIL PROTECTED]> wrote:
> Hi all! I could use some perspective on a project that I am currently
> working on.
>
> I am trying to utilize OO to make my PHP easier, but I keep running into
> problems that revolve around the stateless nature of t
* Thus wrote Jed R. Brubaker:
> Hi all! I could use some perspective on a project that I am currently
> working on.
>
> I am trying to utilize OO to make my PHP easier, but I keep running into
> problems that revolve around the stateless nature of the web.
>
> Consider the following: I have a log
So dont make db call, pass appropriate vars thru session... i like to
pass an array of data into my classes, so that there is no db call
inside the constructor, this saves db calls tremendously at times.
so you could pass an array into session called, UserData or whatever,
and use that to constru
Jed R. Brubaker wrote:
> Consider the following: I have a login class that is instantiated at
> the top of every page. It can log you in, check to see if you are
> logged in, etc. This class has an assortment of class variables such
> as userID, userType, etc.
[...]
> A solution is to set all of th
The real reason for having the login class like this is to eliminate
database calls. I thought I could have one session variable that said yo
uwere logged in, but then the database calls would still have to be made on
each page.
Thanks for the idea - any others?
"Jason Davidson" <[EMAIL PROTECTE
put something in your script like
if($_SESSION['authed'] == true)
$user = new User($_SESSION['userId']);
or something similar.
Jason
"Jed R. Brubaker" <[EMAIL PROTECTED]> wrote:
>
> Hi all! I could use some perspective on a project that I am currently
> working on.
>
> I am trying to u
15 matches
Mail list logo