source:
Dev/branches/rest-dojo-ui/Cartis/database_example.php
@
312
Last change on this file since 312 was 312, checked in by jkraaijeveld, 13 years ago | |
---|---|
File size: 455 bytes |
Rev | Line | |
---|---|---|
[312] | 1 | <?php |
2 | require 'classes/master.php'; | |
3 | ||
4 | $db = new DatabaseInterface(); | |
5 | $result = $db->get("user", array("name" => "jkraaijeveld")); | |
6 | print_r($result); | |
7 | ||
8 | // Create new application and save it in database | |
9 | $newApp = new Application(null, "Titel", "Beschrijving", "Stijl"); | |
10 | $db->set(newApp); | |
11 | ||
12 | //Retrieve all Questions | |
13 | $results = $db->get("question", array()); | |
14 | ||
15 | //Batchsave all results | |
16 | $db->set($results); | |
17 | ?> |
Note: See TracBrowser
for help on using the repository browser.