[geeklog-devel] DB_insertId and the link identifier

Randy Kolenko Randy.Kolenko at nextide.ca
Sat Mar 26 14:42:55 EDT 2011


The mssql driver works fine without that link identifier.  
I put that big fat warning in there originally as the original
development of the driver didn't seem to work properly without it.



> -----Original Message-----
> From: Dirk Haun [mailto:dirk at haun-online.de]
> Sent: Saturday, March 26, 2011 12:12 PM
> To: Geeklog Development
> Subject: [geeklog-devel] DB_insertId and the link identifier
> 
> The MS SQL driver contains a big fat warning not to call DB_insertId
> without a link identifier since it could potentially return the last
> insert id from some other connection. So far, so good. The problem,
> though, is that there is no valid way to get the current link
> identifier in the first place, since it's a local variable in the DB
> class.
> 
> So, would it not make more sense that if the link identifier is empty,
> to use $this->_db instead, i.e. the link identifier which was used to
> establish the DB connection for this instance?
> 
> The same is probably true for MySQL. The Postgres driver does things
> differently and doesn't use the link identifier at all, so it looks
> like it isn't a problem there.
> 
> There are quite a few places in Geeklog where we call DB_insertId
> without a link identifier, e.g. in lib-comment.php
> 
> bye, Dirk
> 
> _______________________________________________
> geeklog-devel mailing list
> geeklog-devel at lists.geeklog.net
> http://eight.pairlist.net/mailman/listinfo/geeklog-devel




More information about the geeklog-devel mailing list