Posts by Andre Maia • 105 points
15 posts
-
0
votes1
answer26
viewsQ: CONCAT WITH ERROR
SELECT b.numero_contrato as name, CONCAT( sum(CASE WHEN a.status = 'Concluida' THEN 1 ELSE 0 END) AS concluidas, sum(CASE WHEN a.status = 'Recebida' THEN 1 ELSE 0 END) AS recebidas, sum(CASE WHEN…
-
0
votes2
answers516
viewsQ: Update or Insert with data from another table
I have this command SQL to update the tableREQUISICOES with the table dataREQUISICOES_ATUALIZA. Use as key to update the field numero_requisicao, but I need if not find correspondencia on the table…
-
2
votes1
answer252
viewsA: Left Join with coalesce
I got: SELECT a.sigla, COALESCE(COUNT(number),0) the numbers FROM sectors a left Join ordem_servico b on b.idsetor = a.idsetor and b.ano = '2017' and b.status = 'Canceled' WHERE a.ativo = 'Sim'…
-
1
votes1
answer252
viewsQ: Left Join with coalesce
I have the following tables setores(idsetor,sigla,ativo) and another with the services executed called ordem_servico(id,numero,idsetor,). I want to count how many services certain sector canceled…
-
0
votes1
answer1529
viewsQ: Recover json ajax data
I have this request: <script type="text/javascript"> jQuery(document).ready(function(){ jQuery('#ajax_form').submit(function(){ var dados = jQuery( this ).serialize(); jQuery.ajax({ type:…
-
1
votes1
answer1625
viewsQ: Request with Post and CURL Method
I am trying to recover the data from an API on the server using CURL, however it seems that POST data is not going <?php $postfields = array( 'login' => 'login', 'senha' => 'senha' ); //…
-
1
votes1
answer233
viewsQ: Error in MSQLI Insert
I am switching from mysql_to mysqli, everything works(update and delete) more on Insert not saved.... where is the error? Insert archive: include("config/con_mysqli.php"); $sigla =…
-
0
votes0
answers130
viewsQ: Inner Join in 5 tables
I have the tables: reparable projects contracts itens_contracted controle_contracts I made that Consultation: Select a.qtd as quantidade_contratada, b.pn, c.numero_contrato, count(d.id_pn)…
mysqlasked Andre Maia 105 -
0
votes1
answer1222
viewsQ: Query in two tables with Count
I have a table in mysql that has a number of contracted items. Table itens_contratados id_hired Item Qty contract Table servico, in this I inform the service I performed in the contract id_hired I…
-
1
votes2
answers2077
viewsQ: Onkeyup event with Jquery
This is what I need to do onkeyup of inputs classy virgula_nao, obey the function: $(document).on('keyup', '#virgula_nao', function () { valor_do_input = valor_do_input.value.replace(/,/gi, ".");}…
-
0
votes2
answers704
viewsQ: Pass GET method by Jquery
I have the following situation, when I test is passing the parameter with var_dump, does not return. What I’m trying to do is not load a new page but let it all happen on Divs. HTML: <td…
-
0
votes1
answer24
viewsQ: Error in newer versions
I have this line on the server that uses PHP and MYSQL in previous versions than on my local machine, works perfectly on the server, but on my machine with more current versions does not work. Is…
-
2
votes1
answer51
viewsQ: Recover all checked checkboxes
I have this code that returns a list of the bank with a checkbox next to each, however when sending it via post only takes the last marked and not all: Example with vardump where I marked all:…
-
1
votes2
answers82
viewsQ: Error showing and hiding a div with Jquery
Gentlemen, good morning, gentlemen! I’m trying to show and hide an image if it satisfies the established conditions, but they only appear after Isis, not understanding what I’m missing. That is, the…
-
0
votes1
answer584
viewsQ: Error comparing two strings with float value
Good afternoon! I am trying to compare numbers with Jquery, they are values with decimals or not. when the value goes up to 999 everything works perfectly, but above this does not work as it should.…