Get up to 80 % extra points for free! More info:

Discussion: Lesson 13 - Object-oriented hit counter in PHP - continuation

Back

 

Comments
Avatar
Justin Jake Telo:2/13/2018 2:27

what is the 'cnt' meaning? thank you for response

 
Reply
2/13/2018 2:27
Avatar
Replies to Justin Jake Telo
David Capka Hartinger:2/13/2018 6:27

Since count is a MySQL reserved keyword, we use cnt as the name of the column carrying the count :)

Edited 2/13/2018 9:54
Reply
2/13/2018 6:27
You can walk through a storm and feel the wind but you know you are not the wind.
Avatar
Agostino I
Member
Avatar
Agostino I:6/18/2019 4:27

HI, whats the meaning of using @ when writing self::$connection = @new PDO?

Reply
6/18/2019 4:27
while(1){ workHard();} but sometimes....take a rest! :)
Avatar
Replies to Agostino I
David Capka Hartinger:6/18/2019 5:39

The @ character suppresses error messages - https://www.php.net/…rcontrol.php. I'm not sure why we decided to use it here, it should work without it as well.

Reply
6/18/2019 5:39
You can walk through a storm and feel the wind but you know you are not the wind.
Avatar
namazbek
Member
Avatar
namazbek:7/29/2019 13:45

why is there no lesson on active record? Or it is discussed in another topic?

 
Reply
7/29/2019 13:45
Avatar
Replies to namazbek
David Capka Hartinger:7/30/2019 11:58

Active record is no standard way how to handle data and it's often considered an antipattern, you can try googling "activerecord antipattern" - https://www.google.com/search?…

It's an interesting topic to write about, but I don't think it's a must-have stuff. I'll write it down and try to bring something about that in the future.

Edited 7/30/2019 12:00
Reply
7/30/2019 11:58
You can walk through a storm and feel the wind but you know you are not the wind.
To maintain the quality of discussion, we only allow registered members to comment. Sign in. If you're new, Sign up, it's free.

6 messages from 6 displayed.