Changeset 132


Ignore:
Timestamp:
10/24/11 14:27:57 (14 years ago)
Author:
jkraaijeveld
Message:

Commited database example

File:
1 moved

Legend:

Unmodified
Added
Removed
  • Dev/branches/jos-branch/database_example.php

    r130 r132  
    33
    44    $db = new DatabaseInterface();
    5 //    $arguments = array("id" => "c571ae05fa6e69ad63a8793f1484206e");
    6 
    7    
    8    
    95    $result = $db->get("user", array("name" => "jkraaijeveld"));
    106    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);
    1117?>
Note: See TracChangeset for help on using the changeset viewer.