Jump to content

mysql shutdown

Recommended Posts

Hello everyone,

In past I had experience like this :

I have two tables on mysql db and these :

  • shops
  • shop_details

the shops table contains orders from users like :

  • order_id
  • order_number
  • id_item

the shop_details table contains detail orders from users like :

  • order_detail_id
  • order_id
  • item_price

And to insert it I used some php code like this (this code just for mapping not actual code) :

	if($validation == true){
		$sql = new mysql(host,user,passw,db);
		$query = $sql->query("insert into shop");

			$sql->query("insert into shop_detail");

All user's orders were able to inserted on table shop,

but not all user's detail orders were inserted to table shop_detail.

so in other word not all data inserted on table shop_detail due mysql shutdown (maybe i don't know)

Note : I used bot to insert all data for test

Q : how to avoid mysql shutdown if much users do order?

please help me


Link to post
Share on other sites

The first question is why have you decided that MySQL is shutting down and this is what you need to find the solution for?  Are you using an error log? Are you getting error messages from MySQL? Are you even checking for MySQL errors in your PHP code?

Let me point out that if your'e not showing actual code then I can only comment on what I'm seeing, so I might be solving a different problem than the one you're actually having if you're showing me different code, but obviously that second query is inside an if statement.  Maybe that's the problem.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...