Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Accessing an External Database


Reply

5 Posts   2955 Views

Avatar
ian

24 May 2008 at 11:12am (Last edited: 24 May 2008 11:13am), Community Member, 7 Posts

I want to create a Graph Obect (which will have fields for titles, x-axis heading, y-axis heading... etc) that uses an external database to pull the data.

Can I simply mix in some normal php database calls into my model?

I will probably make an ExternalDatabase class (similar to ExternalAuthenticator)... but just wondered if anyone had tried this before, and what caveats I should be aware of.

Also, does MS Sql Server work as the primary db for SS? I read that there was some work going on with PDO.

Regards,
Ian

Avatar
christian

25 May 2008 at 10:01pm Community Member, 6 Posts

subscribe

Avatar
ian

25 May 2008 at 10:52pm Community Member, 7 Posts

To answer the second part of my post about MS Sql Server... it seems that SS does support mssql. I found some info at [url]http://doc.silverstripe.com/doku.php?id=database-support[/url].

I'm still curious about any suggestions for pulling data from an external database.

Avatar
ian

4 June 2008 at 2:30am Community Member, 7 Posts

For all those others interested... this post looks like a valuable place to start:

http://www.silverstripe.com/extending-hacking-silverstripe-forum/flat/120

Avatar
Fuzz10

31 July 2008 at 1:43am Community Member, 787 Posts

Subscribe ..

Did you find a proper way of achieving what you want ? I'm going to need this in the near future as well (connecting to another external database to fetch data for use in Silverstripe)....