简体   繁体   中英

What is the best way to retrieve table from MySQL using PHP?

I just have SELECT query which returns table. I don't like to type this query into PHP scripts. I want to create functions and procedures to retrieve data so I just call from PHP, and so it works properly with UPDATE , DELETE statements. But I can't return table!

So what is the best way to get table data from MySQL to PHP without typing query into PHP page?

You can use frameworks for this:

If you have to run same query, you can create a procedure in MySQL as Sirko said.

简单的方法是使用phpi类mysqli。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM