-2

I want to execute 2 queries:

query1 = "insert into country(id, country)value('UDC:123', 'India')";
query2 = "select * from country";

I tried this mysqli_multi_query but it didn't work.

Winter
  • 3,894
  • 7
  • 24
  • 56
Hemant Maurya
  • 136
  • 1
  • 1
  • 14

1 Answers1

-1

I'm not sure if this is the exact code you are using, but 9/10 I have missed a space in my querys or some other small thing. I like to echo my querys out to the browsers copy into phpadmin and it will let me know if the query is wrong or if there is another issue. Like I said 9 out of 10 times it's the query.

jdbwizzard
  • 110
  • 1
  • 7
  • 1
    Just a note, you don't HAVE to copy+paste on phpmyadmin to be able to see errors. There are things that can and should be done to handle error on php. You CAN, you just don't have to ^^. (BTW, I'm not the downvoter) – FirstOne Mar 01 '16 at 14:30