最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - Best way to use variables in multiple functions?

programmeradmin5浏览0评论

So I am running into issues in Query Monitor - duplicate queries. The reason being that I have functions that need to get say, a customer's order status or the like.

What is the cleanest, correct way to ensure I only make that query once, but can use the results of that query in another function?

Sorry, I know its a very noob question, I just want to start cleaning up code and do things properly.

发布评论

评论列表(0)

  1. 暂无评论