| CODENOTIFIER | HelpYou are not signed inSign in |
Project: eStudy
Revision: 832
Author: pcvolkmer
Date: 02 Sep 2008 16:43:36
Changes:moeglicher SQL-Fehler behoben
Files:| ... | ...@@ -83,9 +83,10 @@ | |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | public function setKey( $userId, $key, $type ) { |
| 86 | ||
| 86 | 87 | $sql = "SELECT userkey FROM mod_security where userid='$userId'"; |
| 87 | 88 | if (count($this->db->get_results($sql)) == 0) { |
| 88 | $sql = "INSERT INTO mod_security VALUES ('$userId', '', '', $key, '$type', NOW())"; | |
| 89 | $sql = "INSERT INTO mod_security VALUES ('$userId', '', '', '$key', '$type', NOW())"; | |
| 89 | 90 | } |
| 90 | 91 | else { |
| 91 | 92 | $sql = "UPDATE mod_security SET userkey='$key', keytype='$type' WHERE userid='$userId'"; |