Skip to content

Commit

Permalink
Fix SQL syntax.
Browse files Browse the repository at this point in the history
A trailing semicolon is NOT valid SQL.
  • Loading branch information
yunosh committed Feb 24, 2014
1 parent 1cb0bc4 commit e9c5143
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ansel/migration/4_ansel_upgrade_tagstocontent.php
Expand Up @@ -38,7 +38,7 @@ public function up()
/* Gallery tags */
$sql = 'SELECT gallery_id, tag_name, share_owner FROM ansel_shares RIGHT JOIN '
. 'ansel_galleries_tags ON ansel_shares.share_id = ansel_galleries_tags.gallery_id '
. 'LEFT JOIN ansel_tags ON ansel_tags.tag_id = ansel_galleries_tags.tag_id;';
. 'LEFT JOIN ansel_tags ON ansel_tags.tag_id = ansel_galleries_tags.tag_id';

// Maybe iterate over results and aggregate them by user and gallery so we can
// tag all tags for a single gallery at once. Probably not worth it for a one
Expand Down
2 changes: 1 addition & 1 deletion ansel/migration/8_ansel_upgrade_sqlhierarchical.php
Expand Up @@ -29,7 +29,7 @@ public function up()
$this->changeColumn('ansel_shares', 'share_parents', 'text');

// Add sharenames
$sql = 'SELECT share_id FROM ansel_shares;';
$sql = 'SELECT share_id FROM ansel_shares';
$ids = $this->_connection->selectValues($sql);
$sql = 'UPDATE ansel_shares SET share_name = ? WHERE share_id = ?';
foreach ($ids as $id) {
Expand Down
2 changes: 1 addition & 1 deletion kronolith/migration/21_kronolith_upgrade_exceptionutc.php
Expand Up @@ -88,7 +88,7 @@ public function down()
} catch (Exception $e) {
return;
}
$sql = 'SELECT event_creator_id, event_uid, event_exceptionoriginaldate FROM kronolith_events WHERE event_exceptionoriginaldate IS NOT NULL;';
$sql = 'SELECT event_creator_id, event_uid, event_exceptionoriginaldate FROM kronolith_events WHERE event_exceptionoriginaldate IS NOT NULL';
$update = 'UPDATE kronolith_events SET event_exceptionoriginaldate = ? WHERE event_uid = ?';
$rows = $this->selectAll($sql);
$creator = null;
Expand Down
2 changes: 1 addition & 1 deletion whups/migration/6_whups_upgrade_transactions.php
Expand Up @@ -45,7 +45,7 @@ public function down()
protected function _normalize()
{
$this->beginDbTransaction();
$sql = 'SELECT DISTINCT transaction_id, log_timestamp, user_id from whups_logs ORDER BY transaction_id;';
$sql = 'SELECT DISTINCT transaction_id, log_timestamp, user_id from whups_logs ORDER BY transaction_id';
$rows = $this->selectAll($sql);
$insert = 'INSERT INTO whups_transactions (transaction_id, '
. 'transaction_timestamp, transaction_user_id) VALUES(?, ?, ?)';
Expand Down

0 comments on commit e9c5143

Please sign in to comment.