Posts by mariocamaraneto • 30 points
4 posts
-
-3
votes1
answer241
viewsA: Call the function in PHP several times or store the function in variable?
The second way is not advisable. There are caching strategies for cases involving IO. But the function should always be called. In general, executing a function is more expensive than accessing a…
phpanswered mariocamaraneto 30 -
0
votes1
answer97
viewsA: Log Shell cakephp
It is really not possible to send a message to the terminal from a model or controller. The best way out in this case is to actually use an alternate log for you to track the outputs. In that case…
-
2
votes1
answer227
viewsA: What kind of encryption is that?
I believe this is about bcrypt. By some chance this is in the column of passwords? The traditional hash functions MD5, sha1, ... do not guarantee that the result is really safe, that is, from the…
-
-1
votes1
answer56
viewsA: Relationship between tables causes error: "Unknown column 'Sectors.name' in 'Where clause'"
To make a filter from a second table you need to use matching(). https://book.cakephp.org/3.0/en/retrieving-data-and-resultsets.html#Filtering-by-Associated-data The matching will make the Inner…