You don’t have to, you can implement the “ifNull” function in the same file. What it basically does is it makes sure the view count is 0 in case it was never defined in the database.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| [SOLVED] view & vote code promblem | 15 | 734 | September 14, 2019 | |
| [SOLVED] View count and Like count not updating in collection - code stopped working | 2 | 693 | April 10, 2019 | |
| Dynamic View Counter | 2 | 282 | April 19, 2019 | |
| Views counter | 11 | 2176 | July 27, 2020 | |
| Click counter | 28 | 1780 | April 28, 2020 |