$sql="INSERT INTO $TBL_QUESTIONS(question,description,ponderation,position,type) VALUES('".Database::escape_string($question)."','".Database::escape_string($description)."','".Database::escape_string($weighting)."','".Database::escape_string($position)."','".Database::escape_string($type)."')";
api_sql_query($sql,__FILE__,__LINE__);
$id=mysql_insert_id();
$id=Database::get_last_insert_id();
// duplicates the picture
$this->exportPicture($id);
@ -946,22 +944,16 @@ abstract class Question
* @return an instance of a Question subclass (or of Questionc class by default)