server/lib
Andreas Fischer 63a2bea7ec Remove OC_DB_StatementWrapper::numRows().
Using this method will result in an unneccesary extra SQL query (which also may
return an incorrect result because the underlying table changed in the
meantime).

In general:

If you are performing an UPDATE, DELETE or equivalent query,
OC_DB_StatementWrapper::execute() will already give you the number of
"affected rows" via \Doctrine\DBAL\Driver\Statement::rowCount(). This will
not work for SELECT queries, however.

If you want to know whether a table contains any rows matching your condition,
use "SELECT id FROM ... WHERE ... LIMIT 1".

If you want to know whether a table contains any rows matching your condition
and you also need the data, use "SELECT ... FROM ... WHERE ...", then use
one of the fetch() methods.

If you want to count the number of rows matching your condition, use use
"SELECT COUNT(...) AS number_of_rows FROM ... WHERE ...", then use one of the
fetch() methods.
2013-12-21 19:36:14 +01:00
..
l10n [tx-robot] updated from transifex 2013-12-17 16:43:17 -05:00
private Remove OC_DB_StatementWrapper::numRows(). 2013-12-21 19:36:14 +01:00
public fix return statement 2013-12-19 00:33:29 +01:00
autoloader.php Allow null as cache parameter (if no cache was found) and for cache removal. 2013-10-22 11:17:15 +02:00
base.php dont try to register background jobs if we haven't upgraded yet 2013-12-13 17:15:18 +01:00