equal
deleted
inserted
replaced
101 } |
101 } |
102 |
102 |
103 function die_json() |
103 function die_json() |
104 { |
104 { |
105 $e = addslashes(htmlspecialchars(mysql_error())); |
105 $e = addslashes(htmlspecialchars(mysql_error())); |
106 $q = addslashes($this->latest_query); |
106 $q = str_replace("\n", "\\n", addslashes($this->latest_query)); |
107 $t = "{'mode':'error','error':'An error occurred during database query.\nQuery was:\n $q\n\nError returned by MySQL: $e'}"; |
107 $t = "{'mode':'error','error':'An error occurred during database query.\\nQuery was:\\n $q\\n\\nError returned by MySQL: $e'}"; |
108 die($t); |
108 die($t); |
109 } |
109 } |
110 |
110 |
111 function get_error($t = '') { |
111 function get_error($t = '') { |
112 header('HTTP/1.1 500 Internal Server Error'); |
112 header('HTTP/1.1 500 Internal Server Error'); |