Posts by Paul Polidoro • 345 points
18 posts
-
3
votes1
answer9356
viewsQ: Query data in two tables and add one of the columns
I have two tables need to make a SELECT in both at the same time, basically it will work like this: Note that the result returns the column nome of Tabela A and sum of column media where the ids are…
-
0
votes2
answers1469
viewsA: Dynamically Update php Session with jQuery
Try it like this Javascript: function add(_quant, _preco, _total, _estoque) { quantidade = parseInt($("#"+_quant).val()); estoque = parseInt($("#"+_estoque).val()); preco =…
-
0
votes1
answer344
viewsA: Return php values with javascript
Could do so: $("#div_qualquer").load("obtemnome.php",{id:id}, function(response){ alert(response); //alerta a resposta obtida do PHP }); The only change I made to your code was to pass the…
-
1
votes2
answers159
viewsQ: How to pass the answer received by Volley to a Global variable?
Good afternoon, I was wondering how I could spend one JSONObject received in Volley for a global variable: public class ReceberObjeto { private JSONObject res; public ReceberObjeto(String URL,…
-
2
votes2
answers53
viewsA: In the "while" method adds to the array
Guy sees if that’s more or less what you want: <?php $aux = array(); while($dado = mysqli_fetch_array($sql)){ $title = $dado['title']; $valor = $dado['valor']; $aux2 = array("titulo" =>…
-
1
votes2
answers3031
viewsQ: Update Activity previous to end Current Activity
Good morning, I am developing an Android project and am with a problem I will try to explain clearly: I have two Activitys A and B, my Activity A calls B and stays in the stack, after terminating…
androidasked Paul Polidoro 345 -
1
votes2
answers1979
viewsA: Pass information to a Bootstrap Modal
Good morning, I set up this script to see if it helps you; by clicking on the "Delete" button of the modal, you load the control page inside the modal itself, passing the data via $_POST, so the…
-
1
votes2
answers1543
viewsA: Search the database and display with while
Would that be? $query = "SELECT..."; $sql = mysqli_query($conexao, $query); while($dado = mysql_fetch_array($sql)){ // Enquanto houver dados ficará em loop $a = $dado['coluna1']; //recupera o dado…
phpanswered Paul Polidoro 345 -
1
votes1
answer1629
viewsQ: Automatic database synchronization in Mysql
Good morning, I have a local Mysql database where the availability is 24h, however I have another database in another location that is available for a few hours, anyway... I want to synchronize two…
-
0
votes1
answer295
viewsA: How can I create a form that has a counter and store the information in bank
Good afternoon, I built a script that tells time, pause, resume and to. When stopping sends the data to the file that will do the Insert in the bd <script> var estado = true; //estado do…
-
0
votes2
answers620
viewsQ: Enable TAB key for next field in Regexp
Good morning, I am developing a form where I have a field "username", in this field I use this RegExp("^[0-9a-zA-Z \b]+$") , works perfectly, however at the time I use the TAB key to advance to the…
-
1
votes1
answer240
viewsA: Accentuated error - Search ZIP - Magento
Good afternoon, try the following <?php echo utf8_decode($local);?> This should solve if encoding error.
-
0
votes5
answers1538
viewsA: How to run an event once?
Good afternoon, you can create a global variable to verify this, for example: <script> var verifica = true; $('.oi').mouseenter(function(){ if(verifica){ alert('OLÁ'); verifica = false; } });…
jqueryanswered Paul Polidoro 345 -
2
votes2
answers596
viewsA: How to redirect the page only after confirmation?
Try it like this: $(document).ready(function(){ $("a").click(function(evento){ if(confirm("tem certeza?")){ window.location.href="http://www.google.com"; } }); })…
-
1
votes1
answer985
viewsA: update multiple records with php mysql checkbox
Good morning, try it this way <script> function atualizar(id){ var ck = document.getElementById(id).checked; //verifica se o checkbox estamarcado if(ck){ // se estiver marcado…
-
0
votes4
answers1123
viewsA: Next record. PHP + Mysql
Good morning, try this way: $sql = mysql_query("SELECT * FROM card"); while($dado = mysql_fetch_array($sql)){ $id = $dado['id']; } Thus the variable $id, will receive all table ID’s while there is…
-
1
votes3
answers369
viewsA: Query output on another page
Good afternoon! You could take the amount that was returned "75", pass via GET to another page, create the desired tag and position in HTML with echo, ex: <?php $var = $_GET['valor']; //valor 75…
-
0
votes2
answers978
viewsA: Send email with PHP containing HTML
Good afternoon, you can use the phpmailer library, the use is easy and well simplified: require_once("../phpmailer/class.phpmailer.php"); $email = new PHPMailer(); $email->From =…