Home  >  Article  >  Backend Development  >  How to get the last executed sql statement in php

How to get the last executed sql statement in php

WBOY
WBOYOriginal
2016-09-21 14:13:081678browse

How to get the last executed sql statement in php

Reply content:

How to get the last executed sql statement in php

What kind of framework, brother

Native is not supported, you can record the executed sql yourself.

Write it down yourself, that’s what TP does

If you only need this function, then encapsulate it yourself mysql Query/execution function, record it into a public variable before execution, so that you can check the value of this variable when you need to check the previous item Yeah

It is recommended to use medoo

A very convenient lightweight library

Check it out
You will fall in love with him

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn