diff options
author | Lonnie Ezell <lonnieje@gmail.com> | 2015-07-23 04:48:02 +0200 |
---|---|---|
committer | Lonnie Ezell <lonnieje@gmail.com> | 2015-07-23 04:48:02 +0200 |
commit | c87a66b4023396900aa349a42f4a93bc9f6e8fa9 (patch) | |
tree | f2ffa04ea3798a5cd661fb1f6c8239b5c5fdcc08 /user_guide_src | |
parent | abf089a6c8f50c86601548abf7e827f4d067a348 (diff) |
Tabs vs Spaces and the forgotten rewrite.
Diffstat (limited to 'user_guide_src')
-rw-r--r-- | user_guide_src/source/database/results.rst | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/user_guide_src/source/database/results.rst b/user_guide_src/source/database/results.rst index 3837a7736..071d9718e 100644 --- a/user_guide_src/source/database/results.rst +++ b/user_guide_src/source/database/results.rst @@ -199,9 +199,9 @@ Example:: public function __set($name, $value) { if ($name === 'last_login') - { - $this->last_login = DateTime::createFromFormat('U', $value); - } + { + $this->last_login = DateTime::createFromFormat('U', $value); + } } public function __get($name) @@ -243,10 +243,10 @@ Example:: $query = $this->db->query("YOUR QUERY"); - if ($query->num_rows() > 0) - { - $row = $query->custom_row_object(0, 'User'); + $row = $query->custom_row_object(0, 'User'); + if (is_object($row)) + { echo $row->email; // access attributes echo $row->last_login('Y-m-d'); // access class methods } |