Posts by Marcos Alexandre • 1,284 points
56 posts
-
1
votes1
answer59
viewsA: How to group items from an array with the same category in PHP
Hello, you need to sort the array considering the 'category' key. Use the function usort php. $conjunto[0]['id'] = "1"; $conjunto[0]['categoria'] = "Celular"; $conjunto[0]['produto'] = "Motorola";…
-
0
votes2
answers44
viewsA: HOW TO ADD UP THE VALUE OF A PRO CLIENT COLUMN
This should help: for the quantity we do the sum (sum), and the other fields are grouped, in case it can be by the name of the field or by the order they appear in the selection list: select…
-
0
votes2
answers220
viewsA: Javascript Duvida Simples
Hello, The third variable that says there, is a temporary variable, which keeps the value of A, so that it is not lost when replaced by the value of B. It’s something like that (Remembering that the…
javascriptanswered Marcos Alexandre 1,284 -
2
votes1
answer88
viewsA: How to assign a value after a selection in Section - JAVASCRIPT
Hello, You need to listen to the change event in the select value. Try something like this in javascript: document.getElementById("faturamento").addEventListener('change', function(){ let valores =…
-
0
votes1
answer69
viewsA: Problem with LEFT JOIN in PHP
Try creating aliases for the id column in the visiting table, or change the name. If in the tables involved there are several columns with the same name (id_visitor) it may be 'choosing' the last…
-
1
votes2
answers668
viewsA: SELECT pulling data from Database
You have not made the connection in the Database, if you are using PDO, you must create a new connection: $conexao = new PDO('mysql:host=servidor;dbname=bancodedados', 'usuario', 'senha')…