This topic is locked
[SOLVED]

Dashboard

8/4/2022 2:34:25 PM
PHPRunner Tips and Tricks
N
Nicolas Yacumo author

Hey i hope you are all doing find. I've just update to 10.8 and i've seen a youtube video where using a code snippet on dashboard add a counter element. This is the link to the video,https://www.youtube.com/watch?v=sm33BXUdGsI&t=274s but i dont see the code completely, if any one could help. This is the code so far i could copy it.
It goes on after record added

Sheader="Sales Today:".DATE("Y-m-d")."";
SPassCount=0;
PassCount=DB :: DBLookup("SELECT count("lead_id')as passcount FROM"view_agent_pass_details` WHERE
echo"chl style="text-align:center;\">**Total Sales:".PassCou

Thanks in advance

Nick

Sergey Kornilov admin 8/4/2022

Your code contains error in evey single line. You need to learn at least some very basic PHP syntax. Start with Code snippets in dashboards article from the manual.

N
Nicolas Yacumo author 8/4/2022

Im sorry i took this from Corey´s channel on youtube wich i thought it was some how affiliated with you,
img alt im deeply sorry i´ve posted this, thanks i'll take a look to your link.

Sergey Kornilov admin 8/4/2022

The code in the video is correct but you are not copying it properly.

C
Corrie 8/16/2022

Good day, Nicolas
Corrie here. The guy who made the video.
In this video I was trying to show that you can add code snippets to the dashboard.
I was not trying to show the code as that will differ from project to project.
If you want to know how I extract a single value from the database you can lookup the database API DBLookup().
I hope this helps.

N
Nicolas Yacumo author 8/17/2022

Hi Corrie, thank you very much, you are so very kind, i deeply appreciate your videos on this fantastic software. You are right, thanks i'll check your suggestion. Thanks again to everyone.