php-general | 2001072
Date: 07/20/01
- Next message: Er Galvão Abbott: "[PHP] Re: (another, not entirely)sessions question"
- Previous message: teo <email protected>: "Re: [PHP] (another, not entirely)sessions question"
- In reply to: py: "Re: [PHP] (another, not entirely)sessions question"
- Next in thread: Seb Frost: "[PHP] Displaying tables"
- Reply: Seb Frost: "[PHP] Displaying tables"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
cheers for the advice, I think what i'm going to do is, put the user name
and their id in session vars. then i dont have to select on their id all
the time. there wouldnt be any security issues with that would there?
On Fri, Jul 20, 2001 at 07:49:56AM -0400, py wrote:
> Hello,
>
> I would continue with the queries. That's what a database is made for.
> Optimize them and make
> shure the fields you search often ( the ones in the WHERE clause ) are
> index. Keep the sesion vars
> as small as possible. Cookies are quite a pain to program and if the user
> has disable them, nothing works.
>
> Maybe an object (OOP) of all user info, serialized in an session var, would
> be a solution...
>
> just my advice...
>
> py
>
>
> ----- Original Message -----
> From: Conor McTernan <bort <email protected>>
> To: <php-general <email protected>>
> Sent: Friday, July 20, 2001 7:31 AM
> Subject: [PHP] (another, not entirely)sessions question
>
>
> > Hey there,
> >
> > I'm currently writing a web app using php. I was just looking for some
> > advice on one aspect. On this site, users will be able to log in and post
> > messages, or articles, or replies etc, you get the idea.
> >
> > Anyway, I am storing some info about the users, the usual stuff, name,
> > email, password, all in mysql. I am also storing other info, such as when
> > they last posted, and how many times they have posted.
> >
> > When a user posts a new message, the message is sent to mysql and stored
> > in a table, at the same time, i also have to increment their total number
> > of posts. The way this is done is by selecting the posts field on their
> > userid, which i have to find using their username, which is set as a
> > session var, when the user logs in. This all results in a good few
> > queries to mysql.
> >
> > I was wondering would it be better to load all the user info, e.g. number
> > of posts, last post date, into session vars, or should i set a cookie on
> > the client side, or should i just continue with the queries.
> >
> > Any help is appreciated.
> >
> > conor
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> > For additional commands, e-mail: php-general-help <email protected>
> > To contact the list administrators, e-mail: php-list-admin <email protected>
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> For additional commands, e-mail: php-general-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Er Galvão Abbott: "[PHP] Re: (another, not entirely)sessions question"
- Previous message: teo <email protected>: "Re: [PHP] (another, not entirely)sessions question"
- In reply to: py: "Re: [PHP] (another, not entirely)sessions question"
- Next in thread: Seb Frost: "[PHP] Displaying tables"
- Reply: Seb Frost: "[PHP] Displaying tables"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

