From 070da828640778112e1b75ae0cafe8d5569f1283 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Mon, 15 Jun 2015 07:38:28 +1000 Subject: [PATCH] Remove backticks from SQL statements Summary: Remove backticks from SQL statements for consistency. In //most// places, we don't use backticks around table/field names, so at least be consistent about this. Test Plan: Learned what backticks are used for in MySQL. Reviewers: eadler, epriestley, #blessed_reviewers Reviewed By: eadler, epriestley, #blessed_reviewers Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D13267 --- .../garbagecollector/HeraldTranscriptGarbageCollector.php | 2 +- src/applications/ponder/editor/PonderVoteEditor.php | 4 ++-- .../controller/PhabricatorXHProfSampleListController.php | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/applications/herald/garbagecollector/HeraldTranscriptGarbageCollector.php b/src/applications/herald/garbagecollector/HeraldTranscriptGarbageCollector.php index 18e3ce0b7d..583778e535 100644 --- a/src/applications/herald/garbagecollector/HeraldTranscriptGarbageCollector.php +++ b/src/applications/herald/garbagecollector/HeraldTranscriptGarbageCollector.php @@ -20,7 +20,7 @@ final class HeraldTranscriptGarbageCollector conditionTranscripts = "", applyTranscripts = "", garbageCollected = 1 - WHERE garbageCollected = 0 AND `time` < %d + WHERE garbageCollected = 0 AND time < %d LIMIT 100', $table->getTableName(), time() - $ttl); diff --git a/src/applications/ponder/editor/PonderVoteEditor.php b/src/applications/ponder/editor/PonderVoteEditor.php index 9b9085eeab..58212a08d9 100644 --- a/src/applications/ponder/editor/PonderVoteEditor.php +++ b/src/applications/ponder/editor/PonderVoteEditor.php @@ -63,8 +63,8 @@ final class PonderVoteEditor extends PhabricatorEditor { queryfx($conn, 'UPDATE %T as t - SET t.`voteCount` = t.`voteCount` + %d - WHERE t.`PHID` = %s', + SET t.voteCount = t.voteCount + %d + WHERE t.PHID = %s', $votable->getTableName(), $delta, $votable->getVotablePHID()); diff --git a/src/applications/xhprof/controller/PhabricatorXHProfSampleListController.php b/src/applications/xhprof/controller/PhabricatorXHProfSampleListController.php index c96787cdf0..d04d361fef 100644 --- a/src/applications/xhprof/controller/PhabricatorXHProfSampleListController.php +++ b/src/applications/xhprof/controller/PhabricatorXHProfSampleListController.php @@ -18,18 +18,18 @@ final class PhabricatorXHProfSampleListController switch ($this->view) { case 'sampled': - $clause = '`sampleRate` > 0'; + $clause = 'sampleRate > 0'; $show_type = false; break; case 'my-runs': $clause = qsprintf( id(new PhabricatorXHProfSample())->establishConnection('r'), - '`sampleRate` = 0 AND `userPHID` = %s', + 'sampleRate = 0 AND userPHID = %s', $request->getUser()->getPHID()); $show_type = false; break; case 'manual': - $clause = '`sampleRate` = 0'; + $clause = 'sampleRate = 0'; $show_type = false; break; case 'all':