Created
July 6, 2015 17:10
-
-
Save travisfont/3f67731020c9af6d8157 to your computer and use it in GitHub Desktop.
Basic Skyfire ORM Concept
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $data = new DBTable('dsdada'); | |
| $data->type = 'color'; | |
| $data->name = 'green'; | |
| $array = array | |
| ( | |
| 'id' => 123, | |
| 'name' => 'test' | |
| ); | |
| //$data->select() | |
| //$data->count() | |
| //$data->statement('WHERE id = :id AND name = :name', $array) | |
| // $data->delete() | |
| if (!$data->save()) | |
| { | |
| echo "Error processing data: "; | |
| foreach ($data->getMessages() as $message) | |
| { | |
| echo '<br/>'.$message; | |
| } | |
| } | |
| else | |
| { | |
| echo "Data was saved successfully!"; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment