Mercurial > hg > extraction-interface
comparison develop/models/extractapp.php @ 20:04db1dd9d10d
update topic_regex_relation table when saving (new) regex file
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 23 Feb 2015 14:34:43 +0100 |
parents | f60969462226 |
children | c805470cefee |
comparison
equal
deleted
inserted
replaced
19:f60969462226 | 20:04db1dd9d10d |
---|---|
343 } else { | 343 } else { |
344 $require = $_postdata['text']; | 344 $require = $_postdata['text']; |
345 } | 345 } |
346 | 346 |
347 file_put_contents( $data_path."regex_files/".$_postdata['filename'].".txt", $require); | 347 file_put_contents( $data_path."regex_files/".$_postdata['filename'].".txt", $require); |
348 | |
349 // update topic_regex_relation table | |
350 $topic_id = $_postdata['topic_id']; | |
351 $filename = $_postdata['filename'].'.txt'; | |
352 $query = "INSERT INTO topic_regex_relation (topic_id, regex_filename) VALUES (".$topic_id.",'".$filename."')"; | |
353 $result = mysql_query($query); | |
354 if (!$result) { | |
355 echo json_encode("error"); | |
356 } | |
357 | |
348 } | 358 } |
349 } | 359 } |
350 | 360 |
351 | 361 |
352 // === for export table === | 362 // === for export table === |