[geeklog-devel] SQL Server 2005 - MSSQL Driver

Randy Kolenko Randy.Kolenko at nextide.ca
Tue May 6 13:08:54 EDT 2008


>Also, in regard to MySQL....I think it is important to move that driver
to 
>mysql improved (mysqli) and start slowly implementing
mysql_real_escape_string 
>instead of addslashes, that way we can all work together in creating a
better 
>abstraction layer, hopefully making it extremely easy for anyone to
drop in 
>new support for other DBs any time!
 

Good idea, however I don't necessarily see what you're suggesting
actually happening in practise for GL 1.x short of doing what I had to
do with the mssql class -- using approximations, stored procedures and
UDFs to support the specific database flavour in order to have as many
existing plugins work "out of the box" (not just plugins, but also the
entire GL core code base).
This is why I was curious to see your revamped mssql class in order to
get an idea of what you've done to improve on it.  Especially for things
like LIMIT and REPLACE INTO approximations (that's not even including
the fact that the UDFs and stored procs I wrote were to help ease people
in moving from MySQL to MS SQL server so that their overall plugin code
could remain relatively in tact when using MySQL specific functions).


As for the add/strip/add/strip slashes -- well, as Dirk said, this is a
bit of a sticky issue.  I couldn't really count on anything being in the
right escaped order.  I would suggest getting Geeklog and install as
many plugins as you can download and then do a global search for
add/remove slashes to get a sence as to how many times its done and then
how we could manage that in moving forward for ALL databases.

A real long term solution for GL1.x is to use something like the
boilerplate plugin example I uploaded to Geeklog.net (search for mssql
and its one of the downloadable items).  The boilerplate example shows
how you *can* write a plugin to work with mysql and sql server using
different techniques to get the data up and down the layers of the
application.  In that example, the UI stays the same, but the underlying
data access layer can be swapped out for any DB.

-randy






More information about the geeklog-devel mailing list