diff options
-rw-r--r-- | README.markdown | 40 | ||||
-rw-r--r-- | docs/conf.py | 6 | ||||
-rw-r--r-- | docs/configuration.rst | 4 | ||||
-rw-r--r-- | docs/querying.rst | 2 |
4 files changed, 27 insertions, 25 deletions
diff --git a/README.markdown b/README.markdown index 0c46e85..0b9bb9a 100644 --- a/README.markdown +++ b/README.markdown @@ -42,24 +42,26 @@ The documentation will now be in docs/_build/html/index.html Let's See Some Code ------------------- - $user = ORM::for_table('user') - ->where_equal('username', 'j4mie') - ->find_one(); - - $user->first_name = 'Jamie'; - $user->save(); - - $tweets = ORM::for_table('tweet') - ->select('tweet.*') - ->join('user', array( - 'user.id', '=', 'tweet.user_id' - )) - ->where_equal('user.username', 'j4mie') - ->find_many(); - - foreach ($tweets as $tweet) { - echo $tweet->text; - } +```php +$user = ORM::for_table('user') + ->where_equal('username', 'j4mie') + ->find_one(); + +$user->first_name = 'Jamie'; +$user->save(); + +$tweets = ORM::for_table('tweet') + ->select('tweet.*') + ->join('user', array( + 'user.id', '=', 'tweet.user_id' + )) + ->where_equal('user.username', 'j4mie') + ->find_many(); + +foreach ($tweets as $tweet) { + echo $tweet->text; +} +``` Changelog --------- @@ -128,4 +130,4 @@ Changelog #### 1.0.0 - released 2010-12-01 -* Initial release
\ No newline at end of file +* Initial release diff --git a/docs/conf.py b/docs/conf.py index 85edfb3..1d407d0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -41,16 +41,16 @@ master_doc = 'index' # General information about the project. project = u'Idiorm' -copyright = u'2012, Jamie Matthews, Simon Holywell, Durham Hale' +copyright = u'2013, Jamie Matthews, Simon Holywell, Durham Hale' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = '1.2.3' +version = '' # The full version, including alpha/beta/rc tags. -release = '1.2.3' +release = '' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/configuration.rst b/docs/configuration.rst index 70f99b3..6bfd464 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -82,7 +82,7 @@ configuration array shortcut: .. code-block:: php ORM::configure(array( - 'mysql:host=localhost;dbname=my_database', + 'connection_string' => 'mysql:host=localhost;dbname=my_database', 'username' => 'database_user', 'password' => 'top_secret' )); @@ -243,4 +243,4 @@ Warnings and gotchas .. _the PDO documentation: http://www.php.net/manual/en/pdo.construct.php .. _the PDO set attribute documentation: http://uk2.php.net/manual/en/pdo.setattribute.php .. _PDOStatement documentation: http://www.php.net/manual/en/class.pdostatement.php -.. _Memcached: http://www.memcached.org/
\ No newline at end of file +.. _Memcached: http://www.memcached.org/ diff --git a/docs/querying.rst b/docs/querying.rst index 41c38d6..6d83fff 100644 --- a/docs/querying.rst +++ b/docs/querying.rst @@ -455,7 +455,7 @@ key in an associative array): .. code-block:: php - $people = ORM::for_table('person')->select_many(array('first_name' => 'name', 'age'), 'height')->find_many(); + $people = ORM::for_table('person')->select_many(array('first_name' => 'name'), 'age', 'height')->find_many(); Will result in the query: |