summaryrefslogtreecommitdiff
path: root/idiorm.php
AgeCommit message (Collapse)Author
2014-05-29Fix typos.Stefan Andres Charsley
2014-05-29Fix for parameter types.Stefan Andres Charsley
2014-05-28Merge pull request #202 from lrlopez/where_id_in-2Simon Holywell
where_id_in() for selecting multiple records by primary key
2014-05-28Merge pull request #201 from lrlopez/where_any_isSimon Holywell
Multiple OR'ed conditions support
2014-05-18where_id_in() for selecting multiple records by primary keyLuis Ramón López
2014-05-18Multiple OR'ed conditions supportLuis Ramón López
Multiple OR'ed conditions ------------------------- You can add simple ORed conditions to the same WHERE clause using ``where_any_is``. You should specify multiple conditions using an array of items. Each item will be an associative array that contains a multiple conditions. ```php <?php $people = ORM::for_table('person') ->where_any_is(array( array('name' => 'Joe', 'age' => 10), array('name' => 'Fred', 'age' => 20))) ->find_many(); // Creates SQL: SELECT * FROM `widget` WHERE (( `name` = 'Joe' AND `age` = '10' ) OR ( `name` = 'Fred' AND `age` = '20' )); ``` By default, it uses the equal operator for every column, but it can be overriden for any column using a second parameter: ```php <?php $people = ORM::for_table('person') ->where_any_is(array( array('name' => 'Joe', 'age' => 10), array('name' => 'Fred', 'age' => 20)), array('age' => '>')) ->find_many(); // Creates SQL: SELECT * FROM `widget` WHERE (( `name` = 'Joe' AND `age` > '10' ) OR ( `name` = 'Fred' AND `age` > '20' )); ``` If you want to set the default operator for all the columns, just pass it as the second parameter: ```php <?php $people = ORM::for_table('person') ->where_any_is(array( array('score' => '5', 'age' => 10), array('score' => '15', 'age' => 20)), '>') ->find_many(); // Creates SQL: SELECT * FROM `widget` WHERE (( `score` > '5' AND `age` > '10' ) OR ( `score` > '15' AND `age` > '20' )); ```
2014-05-06Ensure database set up alwaysAndrew Meredith
2014-04-261. Adjustment of code to work with multiple raw_joins 2. Test multiple raw joinsIgor Moiseev
2014-04-26Implemetation of raw_joinIgor Moiseev
2014-04-26Add a RAW JOIN source to the queryIgor Moiseev
2014-04-26INSERT queries are now compound primary keys awareLuis Ramón López
2014-04-26delete() method is now compound primary keys awareLuis Ramón López
2014-04-26UPDATE queries are now compound primary keys awareLuis Ramón López
2014-04-26having_*() methods are now compound primary key awareLuis Ramón López
Also, now they allow multiple column-names per call.
2014-04-26where_*() methods are now compound primary key awareLuis Ramón López
Also, now they allow multiple column-names per call.
2014-04-26Multiple column names can now be specified when calling get()Luis Ramón López
2014-04-26Added a protected method for filtering multiple column primary keysLuis Ramón López
2014-04-26Add support for adding multi-column conditions into queriesLuis Ramón López
2014-04-26Added parameter array checkingStefan Andres Charsley
Testing: Checks the parameter array to ensure the correct number of values inside the parameter with sequential integer indexes. Production: Strips out any non-integer indexes from the parameter array inside the _log_query function.
2014-04-20Merge branch 'master' of github.com:AgelxNash/idiorm into developSimon Holywell
Conflicts: idiorm.php
2014-02-14Query TimeAgelxNash
2013-12-26Adds new IdiormMethodMissingException class for missing magic method calls ↵michaelward82
to ORM and IdiormResultSet
2013-12-26Merge pull request #150 from herroffizier/masterSimon Holywell
Improving typecasting for aggregate db functions
2013-12-26Merge branch 'lazy-setup-db' of https://github.com/falmp/idiorm into developSimon Holywell
2013-12-26Allow unsetting the db (ORM::set_db(null)) to make the test work againMichel Kollenhoven
2013-12-12Issue #156 findMany() returns only the last record in a setSimon Holywell
2013-11-20Removed premature optimization as requestedfalmp
2013-10-02Changed $_db access to ensure it's always properly setupfalmp
Changed configure() to directly set $_config Fixed typo on comment ('mulitple' -> 'multiple')
2013-09-12improved typecasting for aggregate db functionsm4
2013-09-03Merge branch 'master' of https://github.com/ulrikjohansson/idiorm into developSimon Holywell
2013-09-02Correct docblock type hint for set_db($db)Ulrik Johansson
2013-08-30Fix build - forgot function keywordSimon Holywell
2013-08-30Allow `set()` and `set_expr()` calls to be chainedErik Wiesenthal
2013-08-30Issue #133 find_many returns an associative arrayErik Wiesenthal
2013-08-28Add MS SQL `TOP` style syntax supportSimon Holywell
2013-08-28fix travisSam
2013-08-28logger callbackSam
2013-08-28Added ability to use camel cased methods[email protected]
2013-08-28Merge branch 'vicvicvic-wherealias' of https://github.com/vicvicvic/idiorm ↵Simon Holywell
into develop
2013-08-28Merge pull request #120 from tassoevan/developSimon Holywell
Ignore result columns when calling a aggregate function
2013-08-28Merge branch 'master' of https://github.com/mikejestes/idiorm into developSimon Holywell
2013-08-16Add static method `get_config`Mike Estes
2013-08-14Uses table alias in WHEREVictor Andrée
If a table alias is used for the main table, it's not valid according to the SQL standard to refer to it by it's "real name" (see http://www.postgresql.org/docs/8.2/static/queries-table-expressions.html #QUERIES-TABLE-ALIASES). This causes problems when doing JOIN with a table alias for the "main table", since previous code always used table name. Now, we check for a table alias.
2013-07-29Reset dirty expression fields on save as wellSimon Holywell
2013-05-08Ignore result columns when calling a aggregate functionTasso Evangelista
2013-04-16Add support for T-SQL style TOP clausesSebastien Bariteau
2013-03-20fixed phpdoc in get_db()Marcin Wawrzyniak
phpdoc said it returns ORM, but it's PDO
2013-01-30Simplify get_last_query()Simon Holywell
2013-01-30Fix code style on method definitionsSimon Holywell
2013-01-30Closes issue #99 Undefined index errorSimon Holywell