Posts by Thomas Lima • 642 points
24 posts
-
4
votes3
answers1432
viewsA: Perform UPDATE with values from another table, in columns with the same name
Try the following: UPDATE Table_B SET Table_B.col1 = Table_A.col1, Table_B.col2 = Table_A.col2 FROM Table_A INNER JOIN Table_B ON Table_A.id = Table_B.id Taken from:…
sql-serveranswered Thomas Lima 642 -
1
votes2
answers87
viewsA: Error when filtering a value
I identified 2 problems in your code. 1) Since the identation was confusing (at least when I copied your code and pasted it in Netbeans it got a little weird), you ended up leaving a } the most. 2)…
-
0
votes1
answer38
viewsA: Upload page before call
Would that be? <script> var goTo = function(){ document.getElementById("lbl").innerHTML = "LOADING!"; window.location.href="demo_load.php"; } </script> <label…
javascriptanswered Thomas Lima 642 -
1
votes1
answer113
viewsA: How to send names from a php loop to another input using JS
I’ll tell you what: //Aqui você precisa passar o ID do seu campo function passar(id){ //Note que o ID do seu campo é composto por 'valorA_' + ID do usuario var id_campo = 'valorA_'+ id var valorA =…
-
2
votes1
answer343
viewsA: Check if an element of an array is contained in each element of another array with php
Navigate the 2 arrays in search of an occurrence: foreach ($ads as $link) { foreach ($filter_ads as $ads) { if (strpos($link, $ads)){ echo "Achei aqui: <br />" . "Link: ". $link ." <br…
-
0
votes1
answer76
viewsA: get the id of a dynamically generated tag a
Assuming that your div is inside the tag body of your html and that you already have the jquery library included in the code, Do the following: <script> $(document).ready(function(){…
-
1
votes1
answer1406
viewsA: How do you pass data to a php class via ajax when this is another instance class?
Partner, assuming you’re not using MVC, I suggest something like this: $("body").delegate(".btnAcao", function(e){ e.preventDefault() //Retirando o comportamento padrão /* *Você pode recuperar os…
-
5
votes2
answers156
viewsA: Syntax error in SELECT, in PHP
Correct syntax is: SELECT * FROM tabela WHERE ROWNUM =5 ORDER BY coluna
-
2
votes1
answer451
viewsA: How to send data from a php loop to an input using JS
The ID attribute of an element must be unique. So you must change the id of the elements inside while, so that each one receives a unique id. It can be solved like this: <input TYPE="text"…
-
4
votes2
answers10224
viewsA: Updating multiple records to the same ID
Partner, you will need a checkbox next to each record in your listing, to mark the records you want to change. Your SQL statement will look like this: UPDATE licenca SET data_validade_inicial=…
-
0
votes5
answers1137
viewsA: Postgresql - Remove tuple referenced by another table
Try the following: SELECT s.*, CASE WHEN t.id_sistema IS NOT NULL OR c.id_sistema IS NOT NULL OR cs.id_sistema IS NOT NULL THEN 'disabled' END as desabilitar FROM sistema s LEFT JOIN telemetria t ON…
-
0
votes2
answers522
viewsA: Search by data php Pdo
Kevin, I didn’t have time to create the tables and test 100%. But taking advantage of the code you posted, follows a solution: Code: <?php $data = filter_input(INPUT_GET, 'dt'); ?> <div…
-
2
votes1
answer546
viewsA: Working with high processing load in a table
Good morning Vinicius, I am no database expert, but I will try to help by indicating actions that I believe will help you. 1) Consider partitioning your table. If your table has a very large volume…
-
5
votes1
answer1654
viewsA: macro to copy and paste
Good morning @Mario Felicio Follow the code of the Macro: Sub CopyPaste() Dim ws As Worksheet Dim qtde As Integer Dim linFrom As Integer Dim linTo As Integer Dim colFrom As String Dim colTo As…
-
3
votes2
answers808
viewsA: Take the names of a form on a php page and put it in a select list on another php page
Boa Tarde Túlio, Another and safer option would be to use PDO. It would look something like this: <?php try { $conn = new PDO('mysql:host=enderecodohost;dbname=nomedodb', $usuario, $senha);…
-
1
votes2
answers668
viewsA: Update sql Sem Reload with a click on Link
Good afternoon Fábio. Well, I took the liberty of making a few minor changes that I think are a little bit better. In the code below, I left the tag <a> out of the form, but you can leave it…
-
2
votes1
answer2430
viewsA: Align the top of Divs (Bootstrap)
Partner, if you’re using bootstrap, you’ll hardly need to write anything in CSS unless you want to change color and font. Alignment issues, margins and so on... our friend does everything for us! =)…
-
1
votes1
answer440
viewsA: How to get the value of a UF list through the ZIP Code query via Ajax?
Partner, since your Status field is a list, you cannot use . val(), you will need to SELECT an item from your list. Try the following: Swap your entire switch case for the line below: $("#UF…
-
1
votes1
answer8670
viewsA: Recover select value via JS and play in PHP variable
Partner, I see 2 solutions to this: 1st - When calling the run() function in Javascript, take the value of your select and use it in a redirect passing it as parameter: var valor =…
-
1
votes2
answers2308
viewsA: Dynamic form? how to do?
Denis, Oeslei is right. You don’t need (and shouldn’t) create 1 form for each product. What you should do is create 1 SELECT status for each product within the same form and use an array notation []…
-
1
votes1
answer624
viewsQ: Doubt in the Generation of Bradesco banking bill via PHP
I’m having doubts about the generation of Boleto bancário Bradesco via PHP. I’m using the codes from the boletophp project. My doubt is more conceptual than technical. The number field of the…
-
2
votes2
answers81
viewsA: Does page title and random post affect position in search results?
I believe it does, because Google robots take content very much into account. The ideal is that your title has a direct relationship with the content and that this content has been produced by…
-
1
votes2
answers1260
viewsA: Consume Webservice from an external link
Friend, try to add the jQuery library to your code <script src="https://code.jquery.com/jquery-2.1.3.min.js"></script> That’s because the signal $. is a jQuery command, so it was giving…
-
-1
votes1
answer1374
viewsA: Problem showing XML data in HTML
Friend, replace your pure Javascript code with another one using jQuery. That way it gets a little more current. Note that you need to call jQuery.js for the code to work :) <html>…