comparison develop/models/extractapp.php @ 22:a8ae5cbc3364

update topic_tag_relation table when adding new tag
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Tue, 24 Feb 2015 17:29:56 +0100
parents c805470cefee
children a879f6b9d166
comparison
equal deleted inserted replaced
21:c805470cefee 22:a8ae5cbc3364
492 492
493 } 493 }
494 494
495 // === for manage tag list === 495 // === for manage tag list ===
496 public function EditTaglist($_postdata) { 496 public function EditTaglist($_postdata) {
497 497 $query = "SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='taglist'";
498 $query = "SELECT `AUTO_INCREMENT` FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'taglist'"; 498 $result = mysql_query($query);
499 $largest_id = mysql_query($query); 499 if (!$result) {
500 echo json_encode(mysql_error());
501 }
502 $row = mysql_fetch_assoc($result);
503 $largest_id = $row['AUTO_INCREMENT'];
504
500 505
501 $topic_id = $_postdata['topic_id']; 506 $topic_id = $_postdata['topic_id'];
502 $result = $this->GetTaglistByTopicID($topic_id); 507 $result = $this->GetTaglistByTopicID($topic_id);
503 508
504 $taglistArray = array(); 509 $taglistArray = array();