[Pkg-owncloud-commits] [owncloud-doc] 16/227: Update database.rst

David Prévot taffit at moszumanska.debian.org
Sat Oct 11 17:20:29 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud-doc.

commit ba6cad5d0949fbd875d3a8b67b38611bd970441f
Author: Oliver Gasser <oliver at flowriver.net>
Date:   Wed Aug 27 12:08:06 2014 +0200

    Update database.rst
    
    *PREFIX* needs to be all in caps.
---
 developer_manual/app/database.rst | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/developer_manual/app/database.rst b/developer_manual/app/database.rst
index 04e4c1a..91165b9 100644
--- a/developer_manual/app/database.rst
+++ b/developer_manual/app/database.rst
@@ -52,7 +52,7 @@ Inside your database layer class you can now start running queries like:
         }
 
         public function find($id) {
-            $sql = 'SELECT * FROM `*prefix*myapp_authors` ' .
+            $sql = 'SELECT * FROM `*PREFIX*myapp_authors` ' .
                 'WHERE `id` = ?';
             $query = $db->prepareQuery($sql);
             $query->bindParam(1, $id, \PDO::PARAM_INT);
@@ -101,20 +101,20 @@ To create a mapper, inherit from the mapper baseclass and call the parent constr
          * @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException if more than one result
          */
         public function find($id) {
-            $sql = 'SELECT * FROM `*prefix*myapp_authors` ' .
+            $sql = 'SELECT * FROM `*PREFIX*myapp_authors` ' .
                 'WHERE `id` = ?';
             return $this->findEntity($sql, array($id));
         }
 
 
         public function findAll($limit=null, $offset=null) {
-            $sql = 'SELECT * FROM `*prefix*myapp_authors`';
+            $sql = 'SELECT * FROM `*PREFIX*myapp_authors`';
             return $this->findEntities($sql, $limit, $offset);
         }
 
 
         public function authorNameCount($name) {
-            $sql = 'SELECT COUNT(*) AS `count` FROM `*prefix*myapp_authors` ' .
+            $sql = 'SELECT COUNT(*) AS `count` FROM `*PREFIX*myapp_authors` ' .
                 'WHERE `name` = ?';
             $query = $this->db->prepareQuery($sql);
             $query->bindParam(1, $name, \PDO::PARAM_STR);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-doc.git



More information about the Pkg-owncloud-commits mailing list