Questions tagged as 'php'

1
answer

Overlap records in a MySQL table from PHP

Someone would help me to make records overlap in the same table and I have the record of everything I want to see if you can help me is to know how to overlap those records. ---+--------+----------------+------------+----------+----------+----...
asked by 08.07.2017 / 06:26
1
answer

Manipulation of dates in laravel are printed in English using Carbon formatLocalized

I am showing the dates in my view show using Carbon from the controller, but when displaying in Spanish the dates are not shown with "Wednesday" or "Saturday. Controller $tiempo = new Carbon($orden->Fecha_de_Inicio); setlocale(LC_TIM...
asked by 13.07.2017 / 01:52
2
answers

calculate percentage

I have a problem when calculating the percentage I have the following fields: amount, percentage, profits my problem is that the calculation does it wrong, the percentage field I select it with a select and from there it will proceed to take the...
asked by 12.07.2017 / 04:42
2
answers

problems saving time

Greetings friends I have a problem when the time is saved it turns out that if it is 12:45 p.m. it saves me the time 12:15:47 PM the format I use is the following: <?php date_default_timezone_set('America/Caracas'); ?> <input type...
asked by 13.07.2017 / 16:54
2
answers

how to use a form within a modal with php?

I have a modal and inside this modal I have a form, the problem is that when I save the form it is not saved in my database, but if instead of a modal I use another php page my form if it works if you save, and I do not change anything in the co...
asked by 17.07.2017 / 05:53
1
answer

Extract the array in json components, which look like consecutive arrays

I am faced with the following dilemma: I am using the api C3.js of statistics in a project, where I want to make a graph of time of day and the accesses to a building, I have: var chart4 = c3.generate({ bindto: '#estadisticaTemporal',...
asked by 06.09.2017 / 10:03
1
answer

Correct use of Symfony models when complex Querys are needed

I am very new to Symfony, I was looking at the documentation regarding the models, and all the examples and indications place a lot of emphasis on entities ( Entities ) that are well defined in the DB. My problem is that the system I am do...
asked by 29.07.2017 / 23:57
3
answers

Shopping cart with PHP and MySQL that adds repeated products

I am making a shopping cart with PHP and MySQL and if you add products, but the problem is that you add the same one over and over again, even if you add a different one, always insert the same one. Even when I refresh the page, it automatically...
asked by 29.06.2017 / 17:32
1
answer

validate if a variable is of type date

What happens is that I'm doing a query to an IINFORMIX database and the field is of the DATETIME type with Format (year to fraction (3)). I clarify that the format I can not modify. Currently I have this function: function validateDate($dat...
asked by 29.06.2017 / 15:29
1
answer

Consultation in laravel

I make this query: $costo = Habitacion::where("id","=", $habestatus)->select('hab_costo')->first(); * Habestatus is a variable that has the id of the room. and when you print the result, you throw this at me: {"hab_costo":2000}...
asked by 05.03.2018 / 22:28