Php-no-head corpse. how can this problem be solved?

Source: Internet
Author: User
Php-a dead-headed zombie... php to operate mysql. the previous operations on various tables are normal. after the execution, the system prompts that the insertion is successful, but the database has no data. the same user can perform all operations on the terminal using the same account. then I changed the root account on the php page. okay, everything works. if it is an account permission issue, it cannot be inserted on the terminal. what's the problem? I wiped..., mysq php-no head for me...
Php to operate mysql.
The previous operations on various tables are normal. after the execution, the system prompts that the insertion is successful, but the database has no data.

The same user can perform all operations on the terminal using the same account.

Then I changed the root account on the php page. well, everything is normal. if the account permission is incorrect, the root account cannot be inserted on the terminal.
What's the problem?

I wiped...

------ Solution --------------------
If mysql can trace the database
Mysql is too weak.
------ Solution --------------------
Too little information to judge
------ Solution --------------------

A message is displayed, indicating that the database has no data ???
I have never encountered such a situation.

------ Solution --------------------
Is it connected to another database.
------ Solution --------------------
1. no specific code can be judged
2. the lz team is not able to deal with such a strong person. we say the pressure is huge! Haha
------ Solution --------------------
Give me some code. it's useless to say nothing to the code.
------ Solution --------------------
Encountered encoding problems. The content is null and cannot be inserted.
------ Solution --------------------
Use mysql;
Select host, user from user check if the host is not authorized to log on from other hosts?
Or use an invalid account to log on to your mysql instance from another host.
------ Solution --------------------
Oh, you know.
------ Solution --------------------
There are also such strange things. Look at your code ..
------ Solution --------------------
Is there a duplicate table?
Is the data encoding consistent?

I prefer the second option.
------ Solution --------------------
The boss has a problem with the rp during this period. try again later.
------ Solution --------------------
Think about the problem.
------ Solution --------------------
Discussion

Use mysql;
Select host, user from user check if the host is not authorized to log on from other hosts?
Or use an invalid account to log on to your mysql instance from another host.

------ Solution --------------------
Discussion

La la...

The problem is solved, with the words "falling asleep". when I woke up, I found that there was a problem with the code. what is the specific cause? I will post it for further discussion. it must be because the code was not written, but I still need to test it further.

------ Solution --------------------
Remember one sentence: The computer will never be wrong. the mistake will always be human
------ Solution --------------------
The title of the poster is very attractive.
------ Solution --------------------
Discussion

Processing completed.
I haven't written the mysql transaction encapsulation in the code. now I have changed it. I have forgotten how I wrote it before (the wrong code ).
Do not encapsulate mysql operations.

The process is like this.
Mysql processing is normal independently
Mysql transaction start
Mysql transaction ends
Mysql transaction processing-> here the symptoms begin to appear
Now the transaction is fixed, so it is normal.

Thank you for your enthusiastic participation and hope to learn the lessons ......

------ Solution --------------------
It should be code.
------ Solution --------------------
Discussion

Too little information to judge

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.