mirror of
https://github.com/nextcloud/documentation.git
synced 2025-10-26 11:18:02 +00:00
Merge pull request #363 from owncloud/fix-uneeded-undersco
Fix uneeded underscore
This commit is contained in:
commit
73cfeb7eb2
@ -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);
|
||||
@ -234,4 +234,4 @@ Slugs are used to identify resources in the URL by a string rather than integer
|
||||
$author->setName('Some*thing');
|
||||
$author->slugify('name'); // Some-thing
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user