function ajouterTypeDoc() { $max_num = SelectMax("type_doc", "if_type_doc"); $new_num_doc = $max_num + 1; mysql_query("INSERT INTO if_type_doc (type_doc,nom) VALUES ('{$new_num_doc}','{$this->new_type_doc}')"); return $new_num_doc; }
/** * Insère une nouvelle commande dans la base * @return renvoie l'id de la commande insérée */ function creerCommande() { $numerop = SelectMax("numerop", "if_bo_com"); $numerop++; mysql_query("INSERT INTO if_bo_com (numerop,numclient,etat,ttva) VALUES ('{$numerop}','{$this->numclient}','0','{$this->ttva}')"); return mysql_insert_id(); //numcom }