5093 Posts in 1516 Topics by 1113 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1248 Views |
-
External Database

16 March 2010 at 9:25pm
Following challenge:
When creating an new Page, the data should be checked by the data of an external Database.
Example:
Silverstripe:
public static $db = array(
'EventDate' => 'Date',
'EventName' => 'Text',
'EventID' => 'Int',
);$fields->addFieldToTab("Root.Content.Main", new TextField('EventDate','Date:'));
$fields->addFieldToTab("Root.Content.Main", new TextField('EventName','Text:'));External Database:
'eventDate' => 'Date',
'eventName' => 'Text',
'eventID' => 'Int',Bevore storing the data in SilverStripe I have to check, if SilverStripe.EventDate corresponds with an entry in external.eventDate and SilverStripe.EventName corresponds with an entry in external.eventName. If not, store the data in the external database and store the external.eventID in SilverStripe.EventID.
Has anyone any idea?
Cheers
geist
-
Re: External Database

24 March 2010 at 9:23pm
onBeforeWrite... onBeforeDelete...
Hi geist, first look to the documentation, then ask stupid questions...
Cheers
| 1248 Views | ||
|
Page:
1
|
Go to Top |

