Date: 11/10/99
- Next message: kk: "[PHPLIB-DEV] cvs commit"
- Previous message: Kristian Koehntopp: "Re: [PHPLIB-DEV] Incompatible change to active_sessions and auth_user"
- Next in thread: Kristian Köhntopp: "Re: [PHPLIB-DEV] Re: [PHPLIB] active_sessions"
- Reply: Kristian Köhntopp: "Re: [PHPLIB-DEV] Re: [PHPLIB] active_sessions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, 10 Nov 1999, Kristian Koehntopp wrote:
> On Tue, Nov 09, 1999 at 05:08:53PM -0500, Charles P. Wright wrote:
> > I use phplib for use with IMP 2.2.0-pre5, and have been having problems
> > when I logout because of active_sessions updates being interspersed.
> > Attached is code that I've tested with MySQL that uses replace instead of
> > update or insert, this shoud make the update atomic and prevent nastiness.
> > I don't have any other database servers, so I don't know if this fix is
> > MySQL specific, but hopefully someone else will find it useful.
>
> PHPLIB originally used replace instead of insert/update, but
> that is MySQL specific and cannot be used with other databases.
> In the meantime I have come to the conclusion that all database
> operations are database specific and that we should be moving to
> ct_sql__mysql.inc, ct_sql_informix.inc, ct_sql_oracle.inc and so
> on and use the proper, database specific database update
> operations. This has not been done, yet, though.
I don't think that this needs to break compatibility, why not just use the
same ct_sql.inc file, and instead of using one generic SQL statement have
one for MySQL, and others for other databases. From looking at the CVS
source it seems that there is a way to do it correctly in other SQL
databases besides MySQL. A simple case statement based on $db->type
should make this possible. A correctly functioning release that doesn't
break compatibility would be quite nice.
-- Charles P. Wright cpwright <email protected> http://w3.cpwright.com/The trouble with computers is that they do what you tell them, not what you want.
- PHPLIB Developers Mailing List. Send messages to <phplib-dev <email protected>>. To unsubscribe, send "unsubscribe" to <phplib-dev-request <email protected>> in the body, not the subject, of your message.
- Next message: kk: "[PHPLIB-DEV] cvs commit"
- Previous message: Kristian Koehntopp: "Re: [PHPLIB-DEV] Incompatible change to active_sessions and auth_user"
- Next in thread: Kristian Köhntopp: "Re: [PHPLIB-DEV] Re: [PHPLIB] active_sessions"
- Reply: Kristian Köhntopp: "Re: [PHPLIB-DEV] Re: [PHPLIB] active_sessions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

