diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2012-08-25 01:52:27 +0200 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2012-08-25 01:52:27 +0200 |
commit | fa3497f6ed54b6de16dc44ae94721f00b5d5fc6b (patch) | |
tree | 7b3a6c1b946273ee0f1f3f6ade1f9cd3483004dc /lib/backgroundjob | |
parent | fd5af9aff4245127f32f3b90dbd6e52792984447 (diff) | |
download | nextcloud-server-fa3497f6ed54b6de16dc44ae94721f00b5d5fc6b.tar.gz nextcloud-server-fa3497f6ed54b6de16dc44ae94721f00b5d5fc6b.zip |
add backticks to SQL, use limit parameter instead of LIMIT SQL
Diffstat (limited to 'lib/backgroundjob')
-rw-r--r-- | lib/backgroundjob/queuedtask.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/backgroundjob/queuedtask.php b/lib/backgroundjob/queuedtask.php index 68ba97c1e39..a7ec3efbf33 100644 --- a/lib/backgroundjob/queuedtask.php +++ b/lib/backgroundjob/queuedtask.php @@ -30,7 +30,7 @@ class OC_BackgroundJob_QueuedTask{ * @return associative array */ public static function find( $id ){ - $stmt = OC_DB::prepare( 'SELECT * FROM *PREFIX*queuedtasks WHERE id = ?' ); + $stmt = OC_DB::prepare( 'SELECT * FROM `*PREFIX*queuedtasks` WHERE `id` = ?' ); $result = $stmt->execute(array($id)); return $result->fetchRow(); } @@ -44,7 +44,7 @@ class OC_BackgroundJob_QueuedTask{ $return = array(); // Get Data - $stmt = OC_DB::prepare( 'SELECT * FROM *PREFIX*queuedtasks' ); + $stmt = OC_DB::prepare( 'SELECT * FROM `*PREFIX*queuedtasks`' ); $result = $stmt->execute(array()); while( $row = $result->fetchRow()){ $return[] = $row; @@ -63,7 +63,7 @@ class OC_BackgroundJob_QueuedTask{ $return = array(); // Get Data - $stmt = OC_DB::prepare( 'SELECT * FROM *PREFIX*queuedtasks WHERE app = ?' ); + $stmt = OC_DB::prepare( 'SELECT * FROM `*PREFIX*queuedtasks` WHERE `app` = ?' ); $result = $stmt->execute(array($app)); while( $row = $result->fetchRow()){ $return[] = $row; @@ -82,7 +82,7 @@ class OC_BackgroundJob_QueuedTask{ * @return id of task */ public static function add( $app, $klass, $method, $parameters ){ - $stmt = OC_DB::prepare( 'INSERT INTO *PREFIX*queuedtasks (app, klass, method, parameters) VALUES(?,?,?,?)' ); + $stmt = OC_DB::prepare( 'INSERT INTO `*PREFIX*queuedtasks` (`app`, `klass`, `method`, `parameters`) VALUES(?,?,?,?)' ); $result = $stmt->execute(array($app, $klass, $method, $parameters )); return OC_DB::insertid(); @@ -96,7 +96,7 @@ class OC_BackgroundJob_QueuedTask{ * Deletes a report */ public static function delete( $id ){ - $stmt = OC_DB::prepare( 'DELETE FROM *PREFIX*queuedtasks WHERE id = ?' ); + $stmt = OC_DB::prepare( 'DELETE FROM `*PREFIX*queuedtasks` WHERE `id` = ?' ); $result = $stmt->execute(array($id)); return true; |