MSSQL for Joomla! 1.5

For Joomla! 1.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7018
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: MSSQL for Joomla! 1.5

Post by AmyStephen » Tue May 08, 2007 7:41 pm

Hiring someone to create a GPL'ed driver for MySQL is an excellent idea. If you want to do this and are looking for recommendations for excellent developers, there are a couple I would recommend. Feel free to PM me.

JackBreech
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Tue May 08, 2007 3:33 pm

Re: MSSQL for Joomla! 1.5

Post by JackBreech » Tue May 08, 2007 8:06 pm

Amy,

Excuse my ignorance, but are you saying that you know someone that can write a 'driver' to make Joomla! work on MSSQL?

Jack  8)

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7018
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: MSSQL for Joomla! 1.5

Post by AmyStephen » Tue May 08, 2007 8:10 pm

Jack -

I shared a name of a developer with mknz who I *know* can develop a driver for pay that will make Joomla! work on SQL Server. If you are interested, you might PM mknz to see if you can split the costs. It would be FABULOUS to see this type of arrangement used to GPL extensions, advance Joomla!, and help pay developers for their expertise and time.

All the best,
Amy :)

igevans
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Thu Feb 09, 2006 10:36 am
Location: Wales

Re: MSSQL for Joomla! 1.5

Post by igevans » Tue May 08, 2007 10:40 pm

Hi All,

I started this thread a few months ago.  I have done some MSSQL stuff in PHP, including synchronizing MSSQL-MySQL, so I thought I'd have a go at writing an MSSQL class for Joomla.

In theory, this is easy.  Just take the JDatabaseMySQL class definition and write a JDatabaseMSSQL class which takes the same parameters instead, then allow users or system to choose their database and away you go.  Unfortunately there are quite a few issues, most of which are to do with the different SQL implementations and not with any PHP deficiencies.

The first draft code, as well as an explanation of the main difficulties are all posted earlier in this thread.  One of the worst of them is dates, and first I got side-tracked into writing a "real" date class for Joomla, then I moved job and house and lost internet access for 4 weeks.  In the meantime, this thread seems to have come awake again.

I'm not sure that running the core Joomla! database on MSSQL is going to happen anytime soon - unless there are lots of changes to Beta2 since the start of April, there probably needs to be a great deal of re-writing SQL queries and date handling.  Since some 3PDs are parsing and changing the SQL code quite intimately (especially Joom!Fish, and probably others I don't know about) there are lots of things to break, and realistically none of this is going to get into the next release.

That said, a working JDatabaseMSSQL would at least standardise the MSSQL interface for 3PD extensions, which would avoid duplication and make them Joomla! compatible at the most basic level.  Making core Joomla! MSSQL compatible might then happen in future.

Obviously, if anyone else wants to take this up, especially paid/professional developers, that would be great.  Otherwise I will try to get something usable up over the next few weeks, which at least replicates all the JDatabaseMySQL methods, and we can see how it goes from there.

JackBreech
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Tue May 08, 2007 3:33 pm

Re: MSSQL for Joomla! 1.5

Post by JackBreech » Wed May 23, 2007 4:17 pm

Hello Joomla! fans that are constrained to MSSQL....

IGEvans, what is the latest on the class development?

MKNZ, have you contacted the developer that Amy has recommended?  I haven't be authorized to contribute to the payment of this developer, but if I had more info I may be able to offer a proposal to my supervisors.

I think this integration would be an excellent leap forward for the entire community.  Maybe if the code works well, they could add it to 1.5 as an installation option.

As a side-note, would the work done in this effort work on both 1.0.x and 1.5?  Meaning this will help both versions, with tweaking necessary to each one or are they entirely different efforts?

Thanks again for everyone's participation and help. 

Jack  8)

spambox
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Mon May 15, 2006 2:52 pm

Re: MSSQL for Joomla! 1.5

Post by spambox » Thu May 24, 2007 7:59 am

Different people working on the same project? While searching for a LIMIT solution in MSSQL, I found the following thread: http://forum.joomla.org/index.php/topic,161017.0.html. Seems submission.zip has got some enhancements over mssql.zip.

Currently testing mssql within our own environment (No, Joomla is running on MySQL ;D; But we've got a bunch of mssql database to withdrawn information from...)

Trying the following solution:
1) Just prepare al queries for your mssql database (including pagination etc.)
2) Import mssql.php
3) Connect to different database resource (tru mssql)
4) Retrieve data from mssql

mknz
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Tue May 01, 2007 9:38 pm

Re: MSSQL for Joomla! 1.5

Post by mknz » Thu May 24, 2007 2:21 pm

JackBreech wrote: MKNZ, have you contacted the developer that Amy has recommended? 
I did contact him...got no response as of yet...but did you see this new post?
That's what I need...not the whole architecture on MSSQL...just interact with it and keep Joomla MySQL...

i'll see if it'll work for the users/members only stuff

JackBreech
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Tue May 08, 2007 3:33 pm

Re: MSSQL for Joomla! 1.5

Post by JackBreech » Thu May 24, 2007 9:36 pm

Unfortunately spambox's wisdom is beyond my scope.  I hope it works your testing is fruitful.

Also, unfortunately I can't use MySQL at all on my servers.  I'm still looking forward to a full MSSQL solution.  I appreciate everyone's efforts.  If there is some more definates on how feasible getting a transition, I would be able to take that to my 'funding' source and see what I could do to pay a developer.

Yeah.  Long weekend!


Jack  8)

User avatar
pdizzyd
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri Jun 01, 2007 8:40 pm
Location: The Western U.S

Re: MSSQL for Joomla! 1.5

Post by pdizzyd » Fri Jun 01, 2007 8:49 pm

We are very interested in helping with this. Have you considered creating a project on joomlacode.org?

Please let us know we are in the throws of getting Joomla! to work on MS SQL as well.
~open sourcing from a closed-source world~

spinnie
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Jul 03, 2007 8:10 am

Re: MSSQL for Joomla! 1.5

Post by spinnie » Tue Jul 03, 2007 8:35 am

Where can I find this extension. I would love to help testing.

User avatar
lightinthedark
Joomla! Intern
Joomla! Intern
Posts: 91
Joined: Tue Sep 19, 2006 9:12 am
Location: Hampshire, UK

Re: MSSQL for Joomla! 1.5

Post by lightinthedark » Tue Jul 03, 2007 12:24 pm

I made that file that spambox refered to in his earlier post. There have been some small further developments to it since then, so I'll post up the current version here for anyone that's working on it. If an actual project gets made on joomlacode I'm quite happy for my file to be used in whole or in part to create a JDatabaseMSSQL class, which seems to me like the sensible way to implement this much-needed functionality. The abstract class / inheritance model is there for exactly this kind of thing.
Imho the most obvious / effecient / logical way of proceeding with this would be to make a JDatabaseMSSQL that will transparently transform standard sql queries into a format that MS SQL server can understand and give useful results from.

Regarding dates: I've found that for pulling stuff out the mssql db the following syntax is very useful:
CONVERT(char(8), some_date,  112) AS nice_date
or
CONVERT(char(19), some_date, 126) AS nice_date
(see the page http://msdn2.microsoft.com/en-us/librar ... L.80).aspx for docs on that)
but I don't know how you'd deal with dates going in other than scanning the query string first and converting as necessary there.

Hello
:-Lightinthedark
You do not have the required permissions to view the files attached to this post.
Hello
:-Lightinthedark

User avatar
tjay
Joomla! Explorer
Joomla! Explorer
Posts: 325
Joined: Thu Aug 18, 2005 1:50 am
Location: New Orleans
Contact:

Re: MSSQL for Joomla! 1.5

Post by tjay » Wed Jul 04, 2007 12:30 am

If anyone decides to turn this into a full blown component, and would like project hosting give me a shout.
I am watching the thread with great interest, alas I am no coder so all I can offer is some webspace for project use.
This day it is my wish that I helped you to live

catasoft
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Wed Mar 28, 2007 12:55 pm
Location: Italy
Contact:

Re: MSSQL for Joomla! 1.5

Post by catasoft » Mon Jul 23, 2007 9:12 am

Hey guys
While looking for a solution to this same Joomla/MSSQL issue, i ran into this page:

http://joomlacode.org/gf/project/msconnect/
The MS Connect project was created to share the code we develop to connect Joomla! 1.0.x to Microsoft SQL Server.
Hope it helps

Cata
Signature rules: Literal URLs only - http://forum.joomla.org/viewtopic.php?f=8&t=65

MaximShiryaev
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri Jul 27, 2007 10:40 am

Re: MSSQL for Joomla! 1.5

Post by MaximShiryaev » Fri Jul 27, 2007 11:44 am

Hi.

I'm about the same for Firebird:  http://forum.joomla.org/index.php/topic ... #msg922400

Hey, core team! It looks like the only thing needed to make Joomla cross-db is a team leader. The task force is already here!

Maxim Shiryaev.

User avatar
louis.landry
Joomla! Ace
Joomla! Ace
Posts: 1380
Joined: Wed Aug 17, 2005 11:03 pm
Location: San Jose, California
Contact:

Re: MSSQL for Joomla! 1.5

Post by louis.landry » Sat Jul 28, 2007 9:27 am

Sounds great to me .... let me know when you guys have some working code we can look at.  Also, if you run across problematic queries in the core let us know about those as well :)

Good luck!

Louis
Joomla Platform Maintainer
A hacker does for love what others would not do for money.

user deleted

Re: MSSQL for Joomla! 1.5

Post by user deleted » Sat Jul 28, 2007 10:35 am

louis.landry wrote: Sounds great to me .... let me know when you guys have some working code we can look at.  Also, if you run across problematic queries in the core let us know about those as well :)

Good luck!

Louis
** looks at the Q&T desk, hm, no RFC forms yet... Louis will probably fill those in soon enough **

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7018
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: MSSQL for Joomla! 1.5

Post by AmyStephen » Sat Jul 28, 2007 5:29 pm

RobInk wrote: ** looks at the Q&T desk, hm, no RFC forms yet... Louis will probably fill those in soon enough **
Joomla! got you a desk? Will the perks ever end?  :o  hehe Keep us on track, Robin, for v 1.5! Doing good!

When this MS SQL Server driver is available, though, I will be happy to help test.

Amy :)

User avatar
louis.landry
Joomla! Ace
Joomla! Ace
Posts: 1380
Joined: Wed Aug 17, 2005 11:03 pm
Location: San Jose, California
Contact:

Re: MSSQL for Joomla! 1.5

Post by louis.landry » Sat Jul 28, 2007 7:28 pm

*cough*

Certainly its too late to find its way into the 1.5 core .... but I'd be happy to add a working adapter to 1.6 and solve query problems as necessary :)

Louis
Joomla Platform Maintainer
A hacker does for love what others would not do for money.

User avatar
lightinthedark
Joomla! Intern
Joomla! Intern
Posts: 91
Joined: Tue Sep 19, 2006 9:12 am
Location: Hampshire, UK

Re: MSSQL for Joomla! 1.5

Post by lightinthedark » Mon Jul 30, 2007 2:20 pm

I know it's not MSSQL, but it is related:
http://forum.joomla.org/index.php/topic,193981.0.html

There's a discussion there about what is the best way to impliment database abstraction (for Postgres in that exact case, but the principles extend). There seem to be 2 suggestions:
A parser / translator
A JQuery query-building class / package

Currently the msconnect project is only aimed at 1.0, and I believe is using the parse-translate approach. The folks on that other thread seem to think that parsing and translating is inherantly flawed, and that a JQuery package would work better. I think they may be right... if it can be made flexible enough; I'd really like some input from the core team regarding which design to go with as they'll be more likely to know which way fits with their coding approach better. If JQuery is the way to go, I heard there was a version of this many svn revisions ago, but that it had long since faded into non-existence, does anyone know where this code could be found, and if it's even worth using this as a starting point?

Hello
:-Lightinthedark
Hello
:-Lightinthedark

User avatar
plamendp
Joomla! Intern
Joomla! Intern
Posts: 87
Joined: Sun Nov 13, 2005 10:41 am
Location: Varna, Bulgaria

Re: MSSQL for Joomla! 1.5

Post by plamendp » Mon Jul 30, 2007 2:32 pm

Some day I'll change my signature to something meaningful...some day...

User avatar
Jinx
Joomla! Champion
Joomla! Champion
Posts: 6508
Joined: Fri Aug 12, 2005 12:47 am
Contact:

Re: MSSQL for Joomla! 1.5

Post by Jinx » Mon Jul 30, 2007 4:38 pm

JQuery is the way to go, an parser/interpreter is slow and creates unneeded overhead.
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.joomlatools.com - Joomla extensions that just work

MaximShiryaev
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri Jul 27, 2007 10:40 am

Re: MSSQL for Joomla! 1.5: Preliminary Firebird concerns

Post by MaximShiryaev » Tue Jul 31, 2007 9:29 am

Hi.

Here are my Firebird thoughts.

Overally SQL looks OK. Following is a short list of possible problems under Firebird discovered after verifying of all appearances of "SELECT" keyword:

1. CONCAT_WS: can be either extracted to JDatabase wrapper or substituted by Firebird UDF.

2. Numeric 1 does not evaluate to TRUE and 0 to FALSE in conditions.
  Operators like "WHEN CHAR_LENGTH(a.alias) THEN..." should be replaced with "WHEN CHAR_LENGTH(a.alias) > 0 THEN..."

3. Directly double-quoted string constants. In Firebird strings are delimited by single-quotes only. In most places JDatabase quote() wrapper is used but not everywhere. There are some like  field = "com_weblinks".

4. Date and time literals. Should be extraced to JDatabase wrappers.

5. Functions MONTH and YEAR in Firebird are expressions EXTRACT(MONTH from SOME_FIELD). Should be extracted to JDatabase wrappers.

6. Function DATE_FORMAT does not exist in Firebird. Better to replace with php equivalents.

7. Not syntax consideration. Expressions like SELECT A.*, B.D, B.E are dangerous in terms of variable field count in A in future versions.


That's all for now. Tomorrow I will try to analyze all WHERE statements.

Currently my list contains only about 25-30 files with potential problems.

It looks like all that needed is something like JDatabaseSyntaxHelper class with all the syntactical tricks beyond SQL92 as methods.

Maxim.

User avatar
lightinthedark
Joomla! Intern
Joomla! Intern
Posts: 91
Joined: Tue Sep 19, 2006 9:12 am
Location: Hampshire, UK

Re: MSSQL for Joomla! 1.5

Post by lightinthedark » Tue Jul 31, 2007 3:21 pm

Hi,
Without wishing to be accused of spamming the boards, I thought I'd just put up a link to the 1-hour old project to create a JQuery class for 1.5's architecture which will hopefully resolve these db connectivity issues in time for 1.6

The project can be found at http://joomlacode.org/gf/project/jquery_1_5/

All help is welcome
Hello
:-Lightinthedark

User avatar
Jinx
Joomla! Champion
Joomla! Champion
Posts: 6508
Joined: Fri Aug 12, 2005 12:47 am
Contact:

Re: MSSQL for Joomla! 1.5

Post by Jinx » Thu Aug 02, 2007 2:49 pm

Nice work, for once I will act like I didn't notice your spamming attempt  :pop
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.joomlatools.com - Joomla extensions that just work

mknz
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Tue May 01, 2007 9:38 pm

Re: MSSQL for Joomla! 1.5

Post by mknz » Tue Aug 21, 2007 4:34 pm

ok...quick update.  The witch that made us go 100% MSSQL quit! ;D

so, now I can do whatever I want.  Problem is we're still 100% MSSQL on the backend.

I've had it with this rediculous DotNetNuke...it's so childish in comparisson to my Joomla.

Any suggestions on what I should do?

To refresh...I need to be able to pull info from the MSSQL db and have the user admin work in the .net framework (ie: able/disable Joomla users).  That's really it.

Let me know...again...not a programmer...but I could probably get us a touch of funding.

adios mis amigos-mknz

mknz
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Tue May 01, 2007 9:38 pm

Re: MSSQL for Joomla! 1.5

Post by mknz » Tue Aug 21, 2007 9:03 pm

AmyStephen sent me a developer that might be able to do the project, but alas, he is busy. 
I think the option to use MSSQL instead of MYSQL would make Joomla a real option for business.
It has a much higher level of security and I believe it will handle even more connections at once.

I understand there may be ANSI compliance issues, but MSSQL seems to deal well with ANSI compliance...may have an issue with ANSI stored proceedures, but that's another story.

If anyone is interested in helping me develop a core MSSQL driver...please let me know soon.  I may be able to put together a small budget or lead a donation drive for such development.

It could take care of a lot of problems and I believe it could be a major catalyst for Joomla.

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7018
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: MSSQL for Joomla! 1.5

Post by AmyStephen » Tue Aug 21, 2007 9:46 pm

You guys might want to pay attention to this thread.

SmartSource-IT
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Sun Jul 08, 2007 11:44 pm

Re: MSSQL for Joomla! 1.5

Post by SmartSource-IT » Mon Dec 31, 2007 7:21 am

Another possible solution.

Install DNN and use nukelet to run Joomla inside DNN.  http://nukelet.com/

mknz wrote: that's what I'm looking for...that...
Why not just slap a copy of ADOdb into a component and add the necessary configuration options (username password) to the config.xml file?
how would I go about doing that?

I could live with a site users/CMS content in MySQL and a component level querying the MSSQL.  That's brilliant.

fedemil
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sun Dec 23, 2007 6:26 pm

Re: MSSQL for Joomla! 1.5

Post by fedemil » Thu Jan 03, 2008 3:40 pm

News for joomla on MS SQL Server?!

I'm very interesting for this solution...i must work with MS SQL...unfortunately  >:( >:( >:(

The fiel mssql.php in the previous post is for Joomla! 1.5?
I must create a db with MySQL and then i porting the db to MSSQL and i can use mssql.php like driver?
Can you help me?  :'( :'(

tatek
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Mon Sep 08, 2008 7:50 am

Re: MSSQL for Joomla! 1.5

Post by tatek » Mon Sep 15, 2008 5:29 am

Jinx wrote:If the database driver works with a plain Joomla! 1.5 install we could consider adding it to the core in a future release.

emmmmmmmmmmmmmmm glad to hear this.

Tate


Locked

Return to “Joomla! 1.5 Coding”