I have a JSON file that I need to insert the information contained in it into the database.
JSON file:
{"retorno":{"produtos":[{"produto":{"codigo":"AAAAAA","estoqueAtual":20}},{"produto":{"codigo":"BBBBBB","estoqueAtual":10}}]}}
How I'm...
I'm trying to list the contents of a table, showing in each item the items of another table that maintains a relation with the first (1: N). For this I need 2 select, being the 2nd select based on each line of the result of the 1st select. The p...
I'm trying to display the values of a JSON with PHP most unsuccessfully. Used Code:
JSON:
{
"event_name": "offline_message",
"widget_id": "sEcXk3TXEw",
"visitor": {
"name": "ARTULITO BARBOSA DE SOUSA",
"email": "...
I have a table that gives results of paid and unpaid commissions.
I want it to only bring the paid, that is, if number_format($row->amount_paid,2) = 0 does not bring this line.
<?php
$i=-1;
foreach($this->rows->r...
I have two Inputs ( curso[] and formacao[] ) html and when looping with foreach and starts to duplicate the items that are within the second foreach
This is my class
class Pessoa {
private $Formacao;
p...
I have two selects that return two arrays and I need to go through them in the same table, but the records are being duplicated. How can I best resolve this issue?
Follow the example:
<?php
foreach ($contratante...
I have array with several times, sometimes having only 4 and sometimes N times.
I need to get only a few records.
Follow my code:
$array = array(
0 => "08:00:00",
1 => "08:02:00",
2 => "08:04:00",...
I need the following result:
{
"sala": [{
"horario": "18:30",
"data": "Seg e Terça"
}, {
"horario": "10:30",
"data": "Quarta Terça"
}]
}
UPDATE
I'm doing this in PHP:...
I have a problem with entering data in the database with php, I have a form with several checkboxes, so I want to select more than 1 checkbox and insert it into the database, so I did
form
<input type="checkbox" name="f_carteira[]" value...