Since
Mysql
has a
few
proprietary
functions,
it's
impossible
to have
a MS SQL
server
equivalent
function.
A few
examples
are
LIMIT,
REPLACE
INTO,
UNIX_TIMESTAMP,
TO_DAYS,
DATE_FORMAT,
DESCRIBE....
the list
goes on
and on.
However
the
MSSQL
class
takes
many of
these
into
account
and
automatically
translates
some
MYSQL
specific
function
calls
into SQL
server
equivalents.
Using
the
abilities
of MS
SQL
server,
I have
written
helper
User-Defined-Functions
(UDFs),
views,
triggers
and
stored
procedures
to
assist
SQL
server
in
coping
with
MYSQL
function
calls as
well as
help
GL1.4's
code
base
cope
with
data
differences
between
MYSQL
and SQL
server.
The
MSSQL
class
that
I've
written
mimicks
the
MYSQL
class'
members
that
already
exist in
the
/system/databases
directory.
Installation
of a SQL
instance
of
Geeklog
1.4.1
follows
the same
steps as
creating
a fresh
MySQL
instance,
however
it has
these
slightly
different
dependencies:
-
PHP
installed
and
configured
to
use
the
Microsoft
SQL
server
extensions.
-
MS
SQL
server
(MSDE)
installed
-
any
version
2000
or
greater.
-
A
SQL
database
and
database
user
created
for
Geeklog
to
use.
This
item
is
no
different
than
the
comperable
MySQL
step
for
installation,
but
needs
to
be
carried
out
on
the
SQL
server
by a
user
who
has
enough
access
rights
to
create
new
databases.
Once
you have
Geeklog
1.4.1
downloaded
and the
dependencies
configured,
you'll
have to
edit the
config.php
file to
ensure
that the
database
selection
is
changed
from
'mysql'
to
'mssql'
(the
$_DB_dbms
parameter
setting
in
config.php).
Please
note
that the
database
configuration
parameters
for
database,
user and
password
within
config.php
sill
require
configuration
to match
the 3rd
bulleted
item
above.
Important
Notes:
Plugins
which
require
MSSQL
support
will
require
a MSSQL
installer
file and
database
detection
routine
developed
to
support
SQL
Server.
I have
personally
converted
some
plugins
to work
on a
MSSQL
instance
- just
be aware
that
plugins
specifically
written
for
MySQL
will not
work
"out of
the box"
on the
SQL
Server
instance.
Also
note
that the
MSSQL
class
does not
overcome
badly
coded
SQL
routines
which
MySQL
may be
more
forgiving
with.
Properly
formatted
SQL
statements
are a
must and
become
very
important
- so
watch
out for
things
like
including
the
right
columns
for a
group by
clause.
Back
Next
|