Posts by Italo Rodrigo • 4,344 points
275 posts
-
0
votes0
answers24
viewsQ: Fix with select using sum within case
I’m trying to use the code below: select case when((sum(valido) / sum(total) * 100) >= 60 then 60 else (sum(valido) / sum(total) * 100) end) i1 from tabela Syntax error near 'then 60 Else...'…
-
0
votes1
answer37
viewsQ: Single line query result
My database is like this: id | municipio_id | ano | populacao 1 | 0 | 2010 | 5000 2 | 0 | 2011 | 5000 I have the following query: SELECT case when ano = 2010 then populacao end a2010, case when ano…
-
0
votes1
answer40
viewsQ: Make Join using a substring
How to Join two tables to check if one string contains another? Ex: In table A I have the field: AAA;BBB;CCC and in table B I have the field BBB. How to make a Join like this: select * from A join B…
postgresqlasked Italo Rodrigo 4,344 -
-1
votes1
answer275
viewsQ: How to know which ip has connected to a postgresql database?
The question is the same as the title: How to know which ip has connected to a postgresql database? It’s just that I’ve cleared the external access and I need to have some control of where the…
postgresqlasked Italo Rodrigo 4,344 -
0
votes2
answers43
viewsQ: Change object class <i> within <a> tag
With the following code: <a class="btn btn-primary botao" style="background-color:#009999" onclick="importar_txt_cnes()"><i class="fa fa-bolt" style="font-size:1em;"></i>…
-
1
votes1
answer18
viewsA: Knowing if a value exists in an array
I solved with the function below: function recursive_array_search($needle, $haystack) { foreach($haystack as $key=>$value) { $current_key=$key; if($needle === $value OR (is_array($value)…
phpanswered Italo Rodrigo 4,344 -
2
votes1
answer18
viewsQ: Knowing if a value exists in an array
I have the following array in variable $menu: array (size=3) 0 => array (size=2) 'principal' => string 'regulacao' (length=9) 'submenu' => string 'agenda' (length=6) 1 => array (size=2)…
phpasked Italo Rodrigo 4,344 -
0
votes1
answer1419
viewsA: Error connecting Delphi 10.2 + Zeos + Postgresql
The solution is to include the folder where the DLL’s are in the Windows PATH. My Computer > Properties > Advanced System Settings > Environment Variables At this location, add the DLL…
-
1
votes0
answers36
viewsQ: Where is the CSS list that wordpress loads?
My wordpress site is loading some CSS that serve no purpose and need to delete some of the entries, ex: <link rel='stylesheet' id='int-banner-css-css'…
wordpressasked Italo Rodrigo 4,344 -
0
votes2
answers54
viewsQ: Help with Query Mysql
I have the following query: select profissionais_ab.cns cns_medico, profissionais_ab.cbo, unidade_ab.nome from profissionais_ab join unidade_ab on unidade_ab.id = profissionais_ab.unidade_id Return…
-
1
votes3
answers116
viewsQ: URL does not display symbols
I have a website that sends a URL like this: site.com.br/test.php?s=<p>texto</p> The variable s is used by the page test.php to print a PDF. But on the client’s computer it’s showing up…
-
0
votes1
answer33
viewsQ: Select help in two columns
I have the following select command: SELECT pa_coduni, pa_proc_id, sum(case when substr(pa_cmp, 1, 4) = 2017 then pa_qtdapr else 0 end) a2017, sum(case when substr(pa_cmp, 1, 4) = 2018 then…
-
2
votes1
answer122
viewsA: How to check if there is a number in several fields of a table
I managed to solve using the code below: select b.*, s.cnt from cartela b cross apply (select count(*) as cnt from (values (n1), (n2), (n3), (n4), (n5), (n6), (n7), (n8), (n9), (n10), (n11), (n12),…
-
2
votes1
answer122
viewsQ: How to check if there is a number in several fields of a table
I have a table in a Sqlserver database that simulates a bingo card. In total there are 25 fields that represent the card: n1, n2, n3, ..., n25 Let’s say I drew the numbers 5, 28 and 67, as I do a…
-
0
votes0
answers220
viewsQ: Mismatch token error in the Laravel
My login form works correctly: <form action="{{route('autenticacao.logar')}}" method="post"> {{csrf_field()}} <input type="text" name="cpf" class="form-control" placeholder="CPF"…
laravelasked Italo Rodrigo 4,344 -
1
votes2
answers269
viewsA: Operator "or" of Blade Laravel does not work
Try it like this: {{ isset($confirmed) ? 'valor se ok' : 'valor se nao existe'; }} or use the form below to return the value of the variable itself: {{ isset($confirmed) ? $confirmed : 'valor se nao…
-
0
votes1
answer23
viewsQ: Join in three tables does not show all results
SELECT * FROM produto_unidades join produto_notas on produto_notas.id = produto_unidades.produtoNota_id join produto_licitacoes on produto_licitacoes.id = produto_notas.produtoLicitacoes_id where…
-
0
votes2
answers143
viewsA: Error comparing strings in Delphi
The solution is just to separate the comparisons using parentheses: if ((conexao.FieldValues['complex'] = '02') and (conexao.FieldValues['financ'] = '04')) then
delphianswered Italo Rodrigo 4,344 -
-2
votes2
answers143
viewsQ: Error comparing strings in Delphi
I’m using the code: conexao.First; while not conexao.Eof do begin if (conexao.FieldValues['complex'] = '02' and conexao.FieldValues['financ'] = '04') then total24:= total24 +…
delphiasked Italo Rodrigo 4,344 -
1
votes1
answer169
viewsQ: CSS defaults when printing
My page looks like this: <div class="container"> <div class="row"> <div class="col-sm-12 col-md-12" style="border-style:solid;"> <div style="text-align:center;" class="col-sm-12…
-
-1
votes2
answers330
viewsQ: How to use the style tag in part of a text?
I want to do something kind of like this: <p style="color:red;">Esse texto é vermelho e <style="color:blue;">esse texto é azul</style> mas esse outro continua vermelho</p> I…
-
-1
votes1
answer20
viewsQ: Help to convert SQL to LINQ
I want to convert the code select for a consultation LINQ SELECT bpac.cmp FROM bpac union SELECT bpai.cmp FROM bpai group by cmp order by cmp desc I’m trying to get the first table and I’m already…
-
0
votes1
answer35
viewsQ: Doubt with route
I’ve been trying for a while to make a route work, but so far nothing... Controller: public function profissionais(Request $request, $id){ $vinculo = session()->get('vinculo'); $profissionais =…
-
0
votes1
answer31
viewsQ: Help with middleware group
My web.php file looks like this: Route::get('/login', 'AutenticacaoController@login')->name('autenticacao.login'); Route::post('/logar',…
laravelasked Italo Rodrigo 4,344 -
0
votes1
answer317
viewsQ: Error logging in to Laravel
Personal I’m with login error in Laravel: Autenticacaocontroller.php public function logar(Request $request){ $dados = $request->all(); $cpf = $dados['cpf']; $senha = $dados['senha']; $usuario =…
laravelasked Italo Rodrigo 4,344 -
-1
votes1
answer137
viewsQ: Where in Laravel does not return information
In my Professionalcontroller.php file, I have the code: public function vinculo($id) { $profissional = Profissional::find($id); $unidades = Unidade::all(); $vinculos =…
laravelasked Italo Rodrigo 4,344 -
0
votes0
answers76
viewsQ: Notfoundhttpexception error when copying Laravel site
I created a website on a machine and it works fine. I copied the folder to another computer, installed Composer, typed the commands composer update, php artisan migrate and php artisan app:name…
laravelasked Italo Rodrigo 4,344 -
4
votes2
answers106
viewsQ: Help with select and repeat records
I have a postgresql database with a table like this: id_usuario | dt_atualizacao | atualizacao | outros_dados 123 | 01-01-2001 | 0 | abc 123 | 01-01-2005 | 1 | abe 123 | 01-01-2012 | 1 | acd 123 |…
-
-1
votes1
answer45
viewsQ: I cannot write data to a txt file
Code: qr.ParamByName('mes').AsString:= edmes.Text; qr.ParamByName('ano').AsString:= edano.Text; qr.Active:= true; qr.First; try AssignFile(arq, 'relatorio.txt'); Rewrite(arq);…
delphiasked Italo Rodrigo 4,344 -
1
votes2
answers42
viewsA: Error 404 when configuring custom URL
I had to create a web.config file with the following content: <configuration> <system.webServer> <rewrite> <rules> <rule name="Main Rule" stopProcessing="true">…
wordpressanswered Italo Rodrigo 4,344 -
-1
votes2
answers42
viewsQ: Error 404 when configuring custom URL
made the migration of a wordpress site / Plesk (site to web) and works all well except a detail: The site only works if the pages have the following format: http://brasilcacambas.com.br/? p=123 if I…
wordpressasked Italo Rodrigo 4,344 -
1
votes1
answer1842
viewsQ: Insert quote text in mysql database
I am using the following code to insert a quoted text into a mysql database: mysqli_query($con, "insert into medicacaohistorico (data, unidadeori, unidadedes, itemdetalhe, qtd, solicitante,…
-
0
votes1
answer68
viewsQ: Help with Join in Mysql
I found several questions/answers about John on the site, but I still can’t create the command I need. What I need is the following: I have the following tables: item (I have two entries) id…
-
1
votes2
answers140
viewsQ: Function does not recognize checkbox.checked
I have the following function: function alteraSaldo(item){ saldo = parseInt($('#saldo').val()); campo = $('#'+item); if (campo.checked == true){ alert('sim'); saldo = saldo -…
-
0
votes1
answer13
viewsQ: Help with ORDER BY clause by string
I have the following select command: select nome, case grau when 0 then 'QS' when 1 then 'CI' when 2 then 'CDC' when 3 then 'QM' end grau, case faixa when 0 then 'NÃO' when 1 then 'SIM' end faixa,…
-
1
votes4
answers136
viewsQ: How to know which checkbox are selected?
How do I make a javascript code to know which checkbox are selected and when finding, get the value data-id his? <input type="checkbox" data-id="1"> <input type="checkbox" data-id="2">…
javascriptasked Italo Rodrigo 4,344 -
0
votes1
answer99
viewsQ: Help with Jquery $ is not a Function
My file . js $(document).ready(function () { $("#uf").on("change", function () { atualizaProfissional(); }); $("#botao").on("click", function(){ s = $("#municipio").val(); if (s == 1){…
-
1
votes1
answer2768
viewsQ: How to put a button on top of an image?
I have the following image below: I need to include a button on top of it using CSS, like this: Source code: <div id="exampleModal" class="modal fade" tabindex="-1" role="dialog"…
cssasked Italo Rodrigo 4,344 -
1
votes1
answer1020
viewsQ: Group sum by month and year
I have a simple table in a FIREBIRD database: idCliente: integer dataPagamento: date valor: numeric How to make a select that adds up all amounts payable, grouping by month and year? kind of: select…
-
0
votes1
answer192
viewsQ: Error in including file . js in wordpress theme
Included a . js file in my theme header.php using the wordpress control panel. However, the line I entered in the file does not appear on the page when I check the source code. I’m doing like this:…
wordpressasked Italo Rodrigo 4,344 -
2
votes1
answer23
viewsQ: Error when changing height of an element
I have a iframe with a youtube video inside it. I want him to have the 100% page readout, that’s okay, but I want the height to be proportional to the width. <div style="text-align:center;">…
javascriptasked Italo Rodrigo 4,344 -
0
votes1
answer37
viewsA: How to delete wordpress pages directly in the database?
The table where the pages are, is the same where the posts table are posts or wp_posts depending on your configuration. To delete, just use the command delete from wp_posts where post_title like…
wordpressanswered Italo Rodrigo 4,344 -
0
votes1
answer37
viewsQ: How to delete wordpress pages directly in the database?
I’m making a clone of a wordpress site to model and generate another site. However, the site has more than 2500 pages and I need to leave only 10 that I will use. How can I delete the pages directly…
wordpressasked Italo Rodrigo 4,344 -
2
votes2
answers1312
viewsQ: How to select one element within another with CSS?
I have a Wordpress theme that, when running, generates the following code: <div class="wpb_wrapper"> <article class="icon-box11"> <i class="fa-shield" style=" font-size:3em;…
cssasked Italo Rodrigo 4,344 -
0
votes1
answer27
viewsQ: Wordpress with error 404
I copied a folder from a wordpress site online and pasted it on my local server. I backed up the database and updated my database to the original one. Connection ok. However, when trying to access…
wordpressasked Italo Rodrigo 4,344 -
1
votes0
answers62
viewsQ: Convert.Todatetime error
I have the following code: public JsonResult salvaPaciente(string cns, string sexo, string dataNasc, string nome, string raca, string cep, string ibge, string logradouro, string endereco, string…
-
1
votes0
answers72
viewsQ: How to get data from a modal page?
I have a main page with a simple form: <div class="col-sm-6"> <label for="tipo">Tipo de sessão:</label> <select class="form-control" name="tipo"> <option…
-
0
votes1
answer21
viewsQ: Help with SQL query
I have 3 tables: enterprise: id integer nome string category: id integer idEmpresa integer nome string tag: id integer idEmpresa integer nome string I am consulting as follows: SELECT…
-
1
votes1
answer274
viewsA: Error of Yoganode
This error occurs because there is some "loose" information, that is, it is not within tags. In my case it’s on the line {phone ? (<ListItem title="Telefone" rightTitle={phone} hideChevron />)…
react-nativeanswered Italo Rodrigo 4,344 -
2
votes1
answer3583
viewsQ: Delete line breaks in an echo in PHP
I have an html/php page that receives data in a textarea and saves it in a mysql database. Sometimes the user uses line break in his text and saves in the good database. I also have a php page that…
phpasked Italo Rodrigo 4,344