[TYPO3] Where to extend/override if I want to "redirect" database requests?

Daniel Smedegaard Buus danielbuus at gmail.com
Wed Nov 8 14:31:09 CET 2006


Hey :)

So... I've had all this trouble trying to get MSSQL working with TYPO3, then
some other annoyances with different "opinions" in data storage principles
between TYPO3 and my boss ;)

So now I want to do a dual-database setup with TYPO3. One database (MSSQL)
for all items that the site have on sale (it's ecommerce), and another
database (MySQL) for everything else that TYPO3 needs and uses.

What I'd like to know is if it's possible for me to create for instance this
specific setup (this is just an example), which is basically the same as
the CD Collection tutorial by Kasper, with a twist:

I create the extension using the kickstarter, just like Kasper does in the
tutorial.

I create matching tables in MSSQL.

I create an overriding/extending class in PHP which accesses my MSSQL
database and is able to retrieve the data needed for browsing, editing,
searching, etc.

I write "hooks" or whatever and extend or modify or ??? some TYPO3 classes,
so that TYPO3 never "notices" that I actually delete the original tables
(created by the kickstarter) from the MySQL database, and "reroute" all
queries from the backend and frontend plugins through my "hooks" so that
data is actually read from and written to the MSSQL database and *not* the
MySQL "master" database.

I basically want to catch the database/object queries for this particular CD
Collection plugin and redirect them through my very own little wrapper so
that I can use my MSSQL database for this plugin.

Where and how would I do that? Has anybody tried something similar? Is there
an extension I could examine to see how it's been done before?

Thanks,
Daniel :)


-- 
http://www.rhesusb.dk



More information about the TYPO3-english mailing list