mirror of
https://github.com/nextcloud/ocsms.git
synced 2026-08-16 02:42:55 +00:00
Testing pushing test datas
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* ownCloud - ocsms
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later. See the COPYING file.
|
||||
*
|
||||
* @author Loic Blot <loic.blot@unix-experience.fr>
|
||||
* @copyright Loic Blot 2014
|
||||
*/
|
||||
|
||||
namespace OCA\OcSms\Db;
|
||||
|
||||
use \OCP\IDb;
|
||||
|
||||
class Sms {
|
||||
private $db;
|
||||
|
||||
public function __construct(IDb $db) {
|
||||
$this->db = $db;
|
||||
}
|
||||
|
||||
// @TODO
|
||||
public function saveAll() {
|
||||
}
|
||||
|
||||
public function find($id) {
|
||||
$sql = 'SELECT * FROM `*PREFIX*myapp_authors` ' .
|
||||
'WHERE `id` = ?';
|
||||
$query = $db->prepareQuery($sql);
|
||||
$query->bindParam(1, $id, \PDO::PARAM_INT);
|
||||
$result = $query->execute();
|
||||
|
||||
while($row = $result->fetchRow()) {
|
||||
return $row;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user