Commit Graph

10 Commits

Author SHA1 Message Date
Alexandre Alapetite
e3e5954394 PDO refactoring for code simplification (#2522)
* PDO refactor

* Automatic prefix when using the syntax `_tableName`
* Uniformity: MySQL is now PDO::ATTR_EMULATE_PREPARES = false just like SQLite and PostgreSQL, with consequences such as only one statement per query
* Use PDO methods exec(), query(), prepare() + execute() in a more efficient way
* Remove auto-update SQL code for versions older than FreshRSS 1.5 (3 years old)
* The name of the default category is set in PHP instead of in the DB (simplies SQL and allows changing the name according to the FreshRSS language)
* Rename `->bd` to `->pdo` (less of a frenshism, and more informative)
* Fix some requests, which were not compatible with MySQL prepared statements

* Whitespace

* Fix syntax for PostgreSQL sequences

+ MySQL install

* Minor formatting

* Fix lastInsertId for PostgreSQL

* Use PHP 5.6+ const

Take advantage of https://github.com/FreshRSS/FreshRSS/pull/2527
https://www.php.net/manual/en/migration56.new-features.php

* A bit of forgotten PHP 5.6 simplification for cURL

* Forgotten $s

* Mini fix custom user config

https://github.com/FreshRSS/FreshRSS/pull/2490/files#r326290346

* More work on install.php but not finished

* install.php working

* More cleaning of PDO in install

* Even more simplification

Take advantage of PDO->exec() to run multiple statements

* Disallow changing the name of the default category

https://github.com/FreshRSS/FreshRSS/pull/2522#discussion_r326967724
2019-09-29 16:22:50 +02:00
Alexandre Alapetite
c35111fe53 Fix SQLite 2016-09-29 23:36:25 +02:00
Alexandre Alapetite
dbc68590da A bit more PostgreSQL
Simplified statistics https://github.com/FreshRSS/FreshRSS/pull/1250
2016-09-27 23:35:39 +02:00
Alexandre Alapetite
ccb56bcbf3 Simplify SQL in statistics
Reduce the use of product-specific date functions. Improve performances.
Remove redundant functions.
2016-09-11 11:24:32 +02:00
Alexandre Alapetite
264d05297c CSP for statistics
https://github.com/FreshRSS/FreshRSS/issues/1075
2016-02-21 17:26:37 +01:00
Alexis Degrugillier
cd88414abc Add an average per day for the 30 day period 2014-09-29 18:54:03 -04:00
Marien Fressinaud
8731de5c3a Fix repartition stats with 0 or 1 article. 2014-09-19 10:37:29 +02:00
Alexis Degrugillier
aa317eb294 Add repartition statistic support in Sqlite 2014-07-24 22:57:31 -04:00
Alexis Degrugillier
68c0a827d2 Add statistics support for Sqlite
Add statistics support for Sqlite by tweeking one query and rewrite an other. The rewrite implied a complete refactor of the MySql query as well.
Now the code is more flexible and make less queries to the database.

See #527
2014-07-18 20:35:03 -04:00
Alexandre Alapetite
3bbd0e446f Prepare statistics for SQLite
Temporarily disable 30-day statistics for SQLite
https://github.com/marienfressinaud/FreshRSS/issues/100
https://github.com/marienfressinaud/FreshRSS/issues/90
2014-07-06 11:54:00 +02:00