fix code so that it works in MySQL 4.1 (but won't work in MySQL 4.0...)
2005-10-25 Vincent Untz <vuntz@gnome.org> * foundation.gnome.org/vote/include/election-sql.php: fix code so that it works in MySQL 4.1 (but won't work in MySQL 4.0...)
This commit is contained in:
parent
69d83e26cb
commit
adf62b2a7b
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-10-25 Vincent Untz <vuntz@gnome.org>
|
||||
|
||||
* foundation.gnome.org/vote/include/election-sql.php: fix code so that
|
||||
it works in MySQL 4.1 (but won't work in MySQL 4.0...)
|
||||
|
||||
2005-10-25 Vincent Untz <vuntz@gnome.org>
|
||||
|
||||
* foundation.gnome.org/referenda/2005-10/rules.wml: updated the
|
||||
|
|
|
@ -304,7 +304,8 @@ function elec_sql_remove_tmp_token ($handle, $election_id, $email, $tmp_token) {
|
|||
$escaped_email = mysql_real_escape_string ($email, $handle);
|
||||
$escaped_tmp_token = mysql_real_escape_string ($tmp_token, $handle);
|
||||
|
||||
$query = "DELETE FROM " . $tmp_tokens_table;
|
||||
/* In MySQL < 4.1, you'd do "DELETE FROM " . $tmp_tokens_table */
|
||||
$query = "DELETE FROM tt";
|
||||
$query .= " USING ". $tmp_tokens_table . " AS tt, " . $members_table . " AS mt";
|
||||
$query .= " WHERE tt.election_id = '".$escaped_election_id."'";
|
||||
$query .= " AND tt.tmp_token = '".$escaped_tmp_token."'";
|
||||
|
|
Loading…
Reference in a new issue