Questions tagged as 'php'

2
answers

How do I put a select within the while?

Use Sublime text, Mysql Workbench and Xampp. I made an inner join in the select below, in a table called Organizacoes.Copia. In this table there is a field called "id" and I need it to appear in this Php code. I saw several videos and exam...
asked by 07.05.2018 / 14:22
1
answer

Alternative money_format in php on windows

When using money_format on windows, the function does not work because the function is only compatible with strfmon systems. $number = 1234.56; setlocale(LC_MONETARY, 'en_US'); echo money_format('%i', $number) . "\n"; // USD 1,234.56 The a...
asked by 04.05.2017 / 18:15
1
answer

How to check data after submitting form and return result in selected div?

I have two small problems that I have to solve to solve, let's go to the first one: 1- I have the code below right after my submit to verify that the data has been filled out: <?php $data_coleta = $_POST["data_coleta"]; $hora_coleta...
asked by 03.05.2017 / 20:50
1
answer

mysql and php - subtract the last two records from the same column and divide by the last record from another column

I have a carro_log table that keeps the update history of another table. id kilometragem combustivel dt_atualização 1 200 45 2017-05-03 2 400 35 2017-05-03 1 150 38...
asked by 04.05.2017 / 07:33
1
answer

MySQL How to return only part of the result of the FULL-TEXT query

Let's say I have this text stored in a table in my database:    Lorem ipsum dolor sit amet, consectetur adipisicing elit, eiusmod sed   tempor inciudunt ut labore et dolore magna aliqua. Ut enim ad minim come,   wanted nostrud exercitation u...
asked by 04.05.2017 / 11:15
1
answer

How to retrieve the body and header of a POST transaction in PHP?

To retrieve the contents body of a transaction that we receive via POST we use this function file_get_contents('php://input') . But there are several companies that can send a post request to our service and I need to know wh...
asked by 04.05.2017 / 21:21
2
answers

Convert number to date

Good afternoon, I would like to know if there is a way to convert date into PHP.    Example, in Excel the number 42873 is equivalent to the date 18-05-2017. And I can do the opposite as well. Is there a function in PHP, to which I can...
asked by 26.05.2017 / 20:23
1
answer

how can I assign a value from one field to another in javascript?

I have a code in javascript that takes the value of the quantity field with onkeypress however I would also need to get the value of the id field or that the value will be sent via ajax to another page for this one doing an update only that I am...
asked by 02.04.2017 / 21:05
1
answer

How to do select in postgres from an html field and use the return to fill the other fields?

Basically I do not have any experience with html, php or javascrip and I'm trying to get around what I'm asked here. The problem is this: I have to make a registration page where the user selects a base year and if the record exists in the da...
asked by 03.04.2017 / 14:26
1
answer

Find the img tags in a text

I have a random text: $s = " eu sou campeao <img src='leo.jpg' /> teste lala "; I need to add the path of the image and look like this: $s = " eu sou campeao <img src='img/leo.jpg' /> teste lala "; Note: I need to add "im...
asked by 06.04.2017 / 22:06