php - Query to add into multiple tables not working


I've got a query which should insert data into multiple tables, but I get a 500 error when I try to execute it.

What is the problem?

My Query:

$addcompany = "
  INSERT INTO company (name, street, zip, place, phone, contact, email, logo)
      VALUES('".$name."', '".$street."', '".$zip."', '".$place."', '".$phone."', '".$contact."', '".$email."', '".$file."');
  INSERT INTO users (username, password)
      VALUES('".$username."', '".$pass."');
  $addcompany = $conn->query($updatecompany);

I post using ajax, and the 500 error shows me this line:

 c = c("abort");
 try {
   h.send(b.hasContent && || null)
 } catch (i) {
   if (c)
     throw i

It's a 500 internal server error.

People are also looking for solutions to the problem: php - Symfony - sonata formBuilder crashes at Cygwin based enviroment


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.