How to use ifNUll in tp5 framework
有什么是忘不了的。
有什么是忘不了的。 2020-01-04 09:41:15
0
2
1474

I am using leftJoin to query two tables, but the value found in a field (pname) is null. So how do I use ifNUll to set default values for these null fields in tp5? Please let me know.

image.png

有什么是忘不了的。
有什么是忘不了的。

学习PHP,就是打怪升级的过程。

reply all (1)
像风一样自由

Either modify Mysql, or use foreach to judge with PHP

  • reply I've thought about this as well, but I think it's too troublesome so I don't want to do it. Just think of a function and do it. But I found a solution to replace it, which is to use tp's getter.
    有什么是忘不了的。 author 2020-01-07 19:28:03
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!