php - Two tables not being accessed one after the other with mysqli -


i trying first insert values tripdetails table , take values tripdetails , insert them tripmembers table.

the code follows:

$query="insert tripdetails values('','$date','$time','$number','$destination','$status','$id')"; $result=mysqli_query($conn,$query);  $query="insert tripmembers(tripid,id) select max(tripid),id tripdetails"; $result=mysqli_query($conn,$result); 

values being inserted tripdetails no such effect on tripmembers.

please help.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -