Posts by João Paulo M. Bandolin • 50 points
10 posts
-
0
votes0
answers19
viewsQ: Control auto increment column logging in scalable applications in MYSQL
I’m putting together a scalable queue control app (e.g., queues for snack bars or benches). Passwords are formed following the standard Acronym + number. On the same day there cannot be a password…
-
0
votes1
answer36
viewsA: Percentage of each value within a table field. The field stores two values, 1 for yes and 2 for No
Something in this sense may solve your problem, but I would indicate the use of a view in the database to facilitate the search of the data of this report. SELECT (SELECT SUM(u.atendimento = 'S')…
-
0
votes1
answer68
viewsA: How to add a column in the database where its value is equal to the current year + the table id field?
I wouldn’t say that this is a good approach, but it should solve your problem.. that would be the matriculation field’s Insert. CREATE TRIGGER `usuarios_before_insert` BEFORE INSERT ON `usuarios`…
mysqlanswered João Paulo M. Bandolin 50 -
0
votes1
answer18
viewsA: Select Join with last Mysql record
SELECT u.id AS `user_id`, u.`name`, u.`status`, (SELECT t.`name` FROM trips t WHERE t.user_id = u.id ORDER BY t.id DESC LIMIT 1) AS `last_trip` FROM users u WHERE u.`status` = "active" This is…
mysqlanswered João Paulo M. Bandolin 50 -
0
votes1
answer47
viewsA: Problem with Fuction js
The problem you have is in the montarTr() function, in which an infinite loop has been created. As soon as you press the button, the montarTr function is triggered and receives the following object…
javascriptanswered João Paulo M. Bandolin 50 -
0
votes1
answer37
viewsA: How to unify regions with Angularjs no ngrepeat repeating records from a given field
One possibility I see to solve your problem is to create an array of contract objects whose key would be the contract code. Just go through the JSON you have and mount the objects as needed. The…
-
0
votes1
answer48
viewsA: Problem in php code to list the recorded data in the database (beginner)
You are performing the Insert in the table dice, the name of the table you have is test. The function mysqli_query returns an object of type mysqli_result in case of success is false in the fault…
-
0
votes1
answer697
viewsA: Error: Uncaught Error: Call to a Member Function prepare() on null
The problem is that as you declared a constructor in the Equipmentdao class, the constructor of the Model class will not run automatically. If you add the code below in the constructor of the…
phpanswered João Paulo M. Bandolin 50 -
0
votes1
answer29
viewsA: Problem with the magic method __get
Thanks to the help in the comments I managed to get the answer. The problem is that, regardless of the instance, since it is the same class, the __get method will never be triggered, because the…
phpanswered João Paulo M. Bandolin 50 -
0
votes1
answer29
viewsQ: Problem with the magic method __get
I am trying to recover the value of a private property of my class using the magic __get method. According to the PHP documentation, every time I try to access a private or protected property of a…
phpasked João Paulo M. Bandolin 50