1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-04-02 07:28:17 +02:00

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
This commit is contained in:
Joshua Spence 2015-06-15 07:38:28 +10:00
parent 69a9b5c3a3
commit 070da82864
3 changed files with 6 additions and 6 deletions

View file

@ -20,7 +20,7 @@ final class HeraldTranscriptGarbageCollector
conditionTranscripts = "", conditionTranscripts = "",
applyTranscripts = "", applyTranscripts = "",
garbageCollected = 1 garbageCollected = 1
WHERE garbageCollected = 0 AND `time` < %d WHERE garbageCollected = 0 AND time < %d
LIMIT 100', LIMIT 100',
$table->getTableName(), $table->getTableName(),
time() - $ttl); time() - $ttl);

View file

@ -63,8 +63,8 @@ final class PonderVoteEditor extends PhabricatorEditor {
queryfx($conn, queryfx($conn,
'UPDATE %T as t 'UPDATE %T as t
SET t.`voteCount` = t.`voteCount` + %d SET t.voteCount = t.voteCount + %d
WHERE t.`PHID` = %s', WHERE t.PHID = %s',
$votable->getTableName(), $votable->getTableName(),
$delta, $delta,
$votable->getVotablePHID()); $votable->getVotablePHID());

View file

@ -18,18 +18,18 @@ final class PhabricatorXHProfSampleListController
switch ($this->view) { switch ($this->view) {
case 'sampled': case 'sampled':
$clause = '`sampleRate` > 0'; $clause = 'sampleRate > 0';
$show_type = false; $show_type = false;
break; break;
case 'my-runs': case 'my-runs':
$clause = qsprintf( $clause = qsprintf(
id(new PhabricatorXHProfSample())->establishConnection('r'), id(new PhabricatorXHProfSample())->establishConnection('r'),
'`sampleRate` = 0 AND `userPHID` = %s', 'sampleRate = 0 AND userPHID = %s',
$request->getUser()->getPHID()); $request->getUser()->getPHID());
$show_type = false; $show_type = false;
break; break;
case 'manual': case 'manual':
$clause = '`sampleRate` = 0'; $clause = 'sampleRate = 0';
$show_type = false; $show_type = false;
break; break;
case 'all': case 'all':