Posts by Leandro Marzullo • 1,401 points
132 posts
-
0
votes2
answers51
viewsQ: How to cut a sentence and put the results in strings
how do I split a string (in PHP) from strings I already have, for example: $frase = 'tem refrigerante na geladeira'; $pergunta = 'tem'; $local = 'na geladeira'; then I wanted him to bring in the…
phpasked Leandro Marzullo 1,401 -
0
votes1
answer49
viewsQ: Insert into SQL if record does not exist
I have the following PHP function that adds a row to the table: $idmusica = $_GET['idmusica']; $queryvota=(" INSERT INTO euk_sugestoes_votos (idusuario, idmusica) VALUES ($userid, $idmusica) "); The…
-
1
votes1
answer37
viewsQ: How to group results from a query?
I have the following consultation with the name of the recipe and the ingredients: $query = (" SELECT r.receita, i.ingrediente FROM ptp_receitas r, ptp_receitas_ingredientes ri, ptp_ingredientes i…
-
0
votes1
answer94
viewsQ: What is the best way to create an access report?
I am setting up a website recipes (PHP and Mysql) and would like to have in the backend a login report, where I can know what recipes each user sees more, to then suggest other recipes based on…
-
0
votes2
answers67
viewsQ: jQuery bring value from Mysql table
I’m setting up a music list register for a karaoke site. It works like this: Search for pre-registered music Take this song from input and insert it into a li list I have the following: <input…
-
0
votes1
answer89
viewsQ: How to create a real-time list with PHP and Ajax
I’m creating a recipe site, where the ingredients will be registered individually in a table, referencing the recipe id, example of how the tables are: ptp_receitas id|nome 1 |receita de feijão…
-
0
votes2
answers109
viewsQ: How to bring SQL result grouped by year and within months
I have a table like this: data |id 2017-02-01 00:00:00|1 2017-02-01 00:00:00|5 2017-04-01 00:00:00|2 2018-02-01 00:00:00|3 2018-04-01 00:00:00|4 Then I make a query with PHP in Mysql that brings me…
-
0
votes1
answer667
viewsQ: Popular select from countries and states with php mysql ajax
I have 2 selects: #parents and #status. I want that when selecting the country, it populates the state only with the states of that country, which are written in a mysql table: tabela_paises id|pais…
-
0
votes1
answer738
viewsQ: Insert a value into the SQL table for each selected checkbox
I have a form with a checkbox group (equal below) and would like when selecting the values, insert a row in the SQL table for each selected checkbox: <form> <input type="hidden"…
-
0
votes1
answer225
viewsQ: How to create a closer drive search with google api
I need to mount a search that the person selects the state and on the map appear the nearest units, as in the image, how do I? I don’t know where to start:…
-
0
votes1
answer1542
viewsQ: Bring up column values and add up the total with php + mysql
I have the following script that brings the values I need, as I do for it also bring the total sum of $Row['value']? $results = $mysqli->query("SELECT * FROM cv_contratos_dependentes WHERE…
-
0
votes1
answer694
viewsQ: Generate options from a select (years) according to another selected field
I have a registration form for dependents of a plan, where you can choose son, husband, father-in-law, etc. and then the year of birth He wanted, when selecting what the degree of kinship, he go…
-
0
votes1
answer66
viewsQ: How to filter checkbox list as you type? (search neighborhoods)
I have a list of ckeckbox where each one is a neighborhood, so I wanted that when typing the name of the neighborhood, he stares and leaving only the neighborhoods that contain what is typed, just…
-
0
votes2
answers1035
viewsQ: How to insert value in mysql with PHP and Ajax
I have the following page of recipes, which brings the list of ingredients: <?php $db->setQuery("Select * from #__ingredientes"); $tmpingredientes = $db->loadObjectList(); ?> And from…
-
3
votes1
answer1583
viewsQ: How to create a Cron job?
I have a real estate website that every day we do an XML import of the properties added the day before. This import is done by a component where I choose the file and give import and it runs the…
-
0
votes1
answer53
viewsQ: PHP break list items "<li>" into variables to add in MYSQL table
I have a form with <textarea> with the following value: <textarea id="lista-ingredientes" name="lista-ingredientes"> <ul> <li>sal</li> <li>pimenta</li>…
-
1
votes2
answers5888
viewsQ: Add button, insert input value inside the form itself
I have a PHP form to register (food) recipes. When filling this form, it is registered in a Mysql database. <form method="POST"> <input type="text" id="receita"> <input type="text"…
-
0
votes2
answers990
viewsA: How to encrypt GET and copy the parameter
As Rafael Augusto said, changed using the POST, there was so: email: <form action="avaliacao.php" method="post"> <input name="id" type="hidden" value="1" /> <input type="submit"…
-
2
votes2
answers990
viewsQ: How to encrypt GET and copy the parameter
I have an e-mail from feedback that is sent to a user after the service is completed. This email has 5 links, where each is the respective service note (from 1 to 5). I want to direct to the update…
-
1
votes1
answer695
viewsQ: MYSQL query bring results in order of distance using coordinates
I have a table that has the coordinates (latitude and longitude) of the users. How do I make a query to bring who is closest to the location. Ex: ID | Lat | Long 1 | -22.874428 | -43.372334 2 |…
mysqlasked Leandro Marzullo 1,401 -
0
votes1
answer138
viewsQ: Date subtraction today - start date in PHP and bring result ex: 1 day 5hs and 25min
I have 2 variables in PHP. The first is the order date $datarequested and the second is the date now $now. I need to list how long the order has been open. $datapedido is consulted in MYSQL. Both…
-
0
votes0
answers31
viewsQ: How to take part of the text of a form to send to a table
I have a form that after being processed generates an excel file with the data of this form using $_POST to get the values. I need a way to get the name that appears on the side of each input to…
-
1
votes1
answer436
viewsQ: How to add PHP values inside a "for" to bring the total
I have the following schedule, which brings the price of each selected item: for($x=1;$x<=4;$x++){ if($_POST['p'.$x] != '0'){ $sql = "SELECT produto, preco FROM produtos WHERE p = '".$px."'";…
phpasked Leandro Marzullo 1,401 -
2
votes2
answers52
viewsQ: Search only form fields with value other than 0 and put in PHP variable
I have a quote form with 70 products in which the user chooses the amount of products he wants from each one. All are named with id P1, P2...P70 and are number type inputs. <form…
-
1
votes1
answer616
viewsA: How to use subfolder as main folder without changing URL (joomla site)
Solved. At Root create htacess with: # Redirecionamento .htaccess do domínio principal para um subdiretório # Não modifique a linha abaixo RewriteEngine on # Mude exemplo.com.br para o seu domínio.…
-
2
votes1
answer616
viewsQ: How to use subfolder as main folder without changing URL (joomla site)
I have a website that I’m redoing. The old one was made in wordpress (at the root of the site) and the new one in joomla (in the folder "new") I want the domain.com.br to be redirected to the…
-
0
votes1
answer280
viewsQ: How to show an image while the photo slide loads
I have a photo slide that is based on ul and will load the photos to mount the slide. Below the section that brings the photos: <ul id="slide" class="bxslider" style="padding:0px;margin:0px;">…
-
0
votes1
answer678
viewsQ: Receive variable value and insert multiple rows into MYSQL
I have the following variable: $ids = "758,749"; Table has columns: id, id_provider, accepted. When running a PHP script, I would like it to do something like this: INSERT INTO tabela (id,…
-
0
votes1
answer63
viewsQ: How to use PHP variable on other pages
I have a script that brings the results of an sql search as follows: $sql = (...); $result = $db->query($sql); while ($obj = mysqli_fetch_object($result)) { $ids = $obj->id_prestador.","; } If…
-
0
votes0
answers106
viewsQ: PHP take the value of a select and input whenever these are changed and query MYSQL
I have an input field that is a date that changes according to the date chosen in the calendar and 2 selects that are start and end time: <input type="text" value="13-08-2017" name="pickdate">…
-
5
votes1
answer438
viewsQ: How to join 2 SQL queries into a single one (one is a mean value calculation and another search criteria with BETWEEN
I’m setting up a system that finds providers in a specific region, calculates the average value charged by them and brings this value. But before that he will only pick up the providers that are…
-
1
votes2
answers63
viewsQ: SQL query to identify available hourly providers
I have a table for service providers that informs the time they are not available. id_prestador | id_pedido | hora_entrada | hora_saida 1 | abc1 | 2017-08-10 10:00:00 | 2017-08-10 14:00:00 2 | xpto2…