I want to insert data from a form and another table where inv_id = "'.$inv.'"
are in the same table "history"
($inv
is data input from form) (sorry for my bad english)
Actually my query:
$query2 = "INSERT INTO istoric SET id_user = '".$user."',id_equipment = '".$nr_inv."',start = '".$startdate."',end = '".$enddate."',comment = '".$comment."'";
$id = "INSERT INTO `istoric`(`condition`) SELECT `status` FROM `echipament`WHERE `nr_inventar` = '".$nr_inv."'";
How to combine two query? Now this query insert data in two different rows.
History table: