Questions tagged as 'php'

2
answers

Concatenate the field and group the remainder

I have the following query: SELECT finempe.data_empenho , finempe.num_empenho , finhisem.quantidade , finhisem.historico , finhisem.valor , finhisem.valor_total FROM finempe RIGHT JOIN finhisem ON (finhis...
asked by 26.04.2018 / 18:14
1
answer

Function to allow only one vote for equipment

I set up a simple polling system in which you can vote only once per IP. However, it registers the IP of the network and not the user's computer, making it impossible for other equipment on the same network to vote. I already researched Google a...
asked by 03.05.2018 / 22:25
1
answer

I can not list a table in php

I can not list a simple table in php ... I do not see what's wrong with the code, when I run this php code it just shows me a blank page ... What am I doing wrong? <html> <head> <title>Listar Alunos</alunos> </he...
asked by 07.05.2018 / 20:30
1
answer

Uploading files working with sockets in PHP

A little while ago, I decided to explore and study some sockets to be worked on in PHP. So I got a good tutorial on the internet and I decided to create a very simple chat where I connect the server and two machines access the address to do the...
asked by 04.05.2018 / 13:24
1
answer

Get the innermost array of multidimensional array

I have the following json { "data": { "card": { "current_phase": { "id": "3134719", "name": "Phase Final" }, "child_relations": [ { "cards": [ { "id": "6405893...
asked by 08.05.2018 / 15:50
1
answer

Remove accents from an array

I have a select in which it is populated through a query in the database: <select class="form-control" name="select_cidades"> <option>Selecione a Cidade</option> <?php $resu...
asked by 06.03.2018 / 19:26
1
answer

Conflict of forms

I have 2 forms, one per ajax and the other normal php. both forms are running, but when I run the php form without ajax it returns me the php form errors with ajax.    PHP With ajax if ($_SERVER["REQUEST_METHOD"] == "POST") {    PHP Wit...
asked by 08.03.2018 / 15:26
1
answer

Create JSON from Bank Select

Populate a mysql database with data in this format:  andIwantedtoreturnthisinjsonusingphp,theproblemisthatIhaveforexampleseverallineswiththesamestate,andneedtoreturnthejsonstringformat:{"Estados": { "Espirito Santo": { "Cidades": {...
asked by 08.03.2018 / 18:31
1
answer

Convert Date, time and minute to "time"

I need to convert date, time and minute to that function time() , I tended something like time('$row[postdate] $row[posthora]') could not, is there any way to do this? I do not have code to post, I just have to convert $row['p...
asked by 09.03.2018 / 15:40
1
answer

Put the euro symbol on a table

In my query I have two columns where I make the sum of hours and the sum of the amount to be paid by the client at these times: Line summing times: CAST(SUM(SEC_TO_TIME(E.teste1))/100 AS DECIMAL (15,2)) AS QTD 1º e 2º Hora Line t...
asked by 07.03.2018 / 11:47