Questions tagged as 'php'

1
answer

Calculate the difference in working hours between two dates

I need to calculate the difference in working hours between two dates ex: $dataIni = '201705151330'; $dataFim = '201705161230'; Until then I can solve it with the following code: $dataIni = '201705151330'; $dataFim = '201705161230';...
asked by 15.05.2017 / 21:59
1
answer

Doctrine ORM returning array [0] in find

I have a question .. I implemented Doctrine with Silex, I created the entity, the repository and the service, but at the time I do a search with findByEmail () for example, to display the result I have to use $ result [0] -> getNome () . Would t...
asked by 16.01.2017 / 22:25
1
answer

How to pass two variables from a view to the controller?

I have a link where I already pass a variable to the controller. It works ok. How do I get through two? My link in View: <a href="{{url("/ordemvar/$equipam->codigoequipamento")}}"><i class="glyphicon glyphicon-tasks"></i&g...
asked by 11.01.2017 / 17:41
1
answer

Open div via ajax

Gelera, I need to open a div via ajax by passing a ID via POST . Where am I going wrong. HTML <div class="row"> <div id="retorno_galeria"> <a onclick="galeria_id(this.id,' . $gal["id"] . ');" href...
asked by 18.01.2017 / 17:10
1
answer

Can I put namespace in old classes?

Well, I work for a company that has a huge system, and we used Doctrine to do the mapping of our tables, but this is a very old one. We used Doctrine a long time ago and we were not aware of namespaces at the time. / p> Now if I just put the n...
asked by 14.08.2017 / 16:01
1
answer

How to join two selects of different tables?

I have the following tables: +--------- + +-------------+ | usuario | |usuario_grupo| +----------+ +--------- + +-------------+ | grupo | |usuario_id|----->| membro_id | +----------+ | nome | | grup...
asked by 23.08.2017 / 22:35
1
answer

Desktop notifications - Javascript

I need to send desktop notifications to the user, even when they are not open, but I can only call event notification (click, load, change ...). How could I send these notifications? Notification.requestPermission(function() {...
asked by 11.08.2017 / 22:49
2
answers

How to check if a date is already in the correct format in php?

I'm getting a date in form and in firefox the DATE field behaves like a normal text field. Hi, I have a date in the format dd/mm/yyyy , so I have a function that converts this date to save in MariaDB (MySql). The problem is that in chrome...
asked by 11.08.2017 / 15:25
1
answer

Problem uploading files in PHP

Hello, I have a problem uploading files from my system. When placing more than 5 files in the field "multiple input file" only 5 are recorded in the database, ie if I put 18 files only 5 files will be written. The strange thing is that in the...
asked by 15.02.2017 / 13:02
1
answer

Error 404 in SASS

Hello. I installed an Opencart module in a store version v1.5.6.4 and saw that the scss of this module is not being found (error 404) even though it is on the server and the correct folder. The header looks like this: <?php if (isset($_S...
asked by 03.02.2017 / 07:56