Posts by Adriano • 596 points
36 posts
-
-2
votes0
answers13
viewsQ: Consult single registry by zend framework
I have a notafiscal table that has a field numerosefaz this field is not autoincrement, so to add the next one, I have to fetch the last added item I am using the code below... But I think the…
-
0
votes2
answers45
viewsQ: sql records = 0
want to show qtos customers I have in every city this sql works but for example, if in Sao Paulo I don’t have any customer registration, it simply hides the city from my report how do I get zero…
-
0
votes3
answers182
viewsQ: Select returns nothing when I have NULL in foreign key
VOUCHER table: code, subproject Table SUBPROJECT: code, name my select: select a.codigo, q.nome as nomesubprojeto, a.subprojeto from comprovante a, subprojeto q where a.subprojeto = q.codigo and…
-
-4
votes1
answer53
viewsQ: mysql description
look at my code select count(alunocursos.codAluno), alunocursos.codCurso from alunocursos join aluno on (aluno.id = alunocursos.codAluno) group by alunocursos.codCurso this will make me return the…
-
0
votes1
answer28
viewsQ: mysql foreign key
someone could help me assemble this query? let’s say I have the following tables: tabela1: aluno (id, nome, cidade) 1 Pedro 2 Joao 3 Joaquim tabela2: cidade (id, municipio) 1 Manaus 2 São Paulo 3…
-
-1
votes1
answer26
viewsQ: report in related tables (mysql)
Guys, I’m breaking into something super simple, but I don’t know where I’m going wrong Let’s say I have the tables below, all related to each other tabela1: nota_fiscal (id, data_emissao) 1…
-
6
votes3
answers839
viewsQ: how to select zero Count
have these tables (example) Municipio (id, nome) 1, Santos 2, Sao Paulo 3, Rio de Janeiro 4, Florianopolis 5, Porto Alegre 6, Natal Cliente (id, nomecliente, cidade) 1, Joao, 1 2, Pedro, 3 3, Maria,…
-
0
votes3
answers860
viewsQ: make a select by grouping by year
I have a client field on it I need to make a Count of how many customers were registered during the years 2016, 2017 and 2018 i was making 3 select, being that in each one I was making a Where…
-
1
votes1
answer76
viewsQ: video on Html5 - how to add two videos
I wanted to make two videos running, one after the other, I tried the way below but it didn’t work. You can do it? <video width='400' height='300' controls loop> <source src='video.mp4'…
-
2
votes2
answers74
viewsQ: how to make this query sql
code is PK in both tabela1: cliente codigo, nome, municipio tabela2: notafiscal codigo, numerodanota, cod_cliente I want to list give a Count(*) on all notafiscal where cod_client.municipio = 10 how…
-
0
votes2
answers703
viewsA: pass several parameters in the ireport
select * from customer where $X{IN,customer_role,roles}
-
1
votes0
answers116
viewsQ: pass several parameters to the ireport
In my Java program I select a list of values and wanted to pass this list to iReport as parameter. This parameter would be used in the SQL query: SELECT ... FROM ... WHERE ... IN($P{list}) when I…
-
1
votes2
answers703
viewsQ: pass several parameters in the ireport
I have the following problem: I created in java a selectcheckbox, where the person will select multiple objects; when sending to the managed bean, I can receive these listed objects. I now want to…
-
0
votes1
answer45
viewsQ: method picking wrong value
Check it out, I got this boot on a datatable <p:commandButton id="prepDownloadAditivoNovo" style="float:left;" icon="ui-icon-arrowthickstop-1-s" value="Download" ajax="false"…
-
0
votes1
answer88
viewsQ: Orderby does not work in java
I have the following structure: a contract, has several additives then I have my contract class and my additive class in contract class, I call it: @OneToMany(mappedBy = "contrato", fetch =…
-
0
votes0
answers57
viewsQ: color a datatable using date
I’m just testing, I want to leave the source red if the date is less than or equal to today but nothing is happening tried with '2017-02-21' '21/02/2017' and does not work my css: .vermelho { color:…
-
0
votes2
answers49
viewsA: Rendered does not let the button work
solved guys, was without scoped upon the Managed Bean
-
0
votes2
answers49
viewsQ: Rendered does not let the button work
I have the code below it only renders if the.aditivopdf contracts are 1 only with this code he does not enter the actionlistener method only that if I remove that rendered, the actionlistener calls…
-
1
votes2
answers153
viewsQ: Many to One Hibernate Java
I have 2 entities: Contracts, which has only id, number Additive, which has id, number, contract The additive contract is a foreign key, in the database is working fine works like this: 1 contract…
-
1
votes2
answers501
viewsQ: sql return zero
mysql returns me the following codMunicipio count(codMunicipio) 271 7 273 248 274 18332 275 25 276 4 as the 272 did not return any, it is not displayed. But I need to return the 272 with Count 0.…
-
7
votes2
answers1132
viewsQ: Select too slow, how to improve?
I have a chart of artisans with about 90,000 records. I created the SQL below to return me the total of artisans in each of the regions that they are registered. Although it works, it is slow,…
-
3
votes2
answers65
viewsQ: How to mount this SQL
I have these tables: Client: cliente ------- id nome id_municipio Municipality: municipio ------- id nome Regional: regional ------- id nome Regional_municipio: regional_municipio -------…
-
3
votes0
answers1356
viewsQ: php folder permission
I have an open source system called NOVOSGA running on my local machine, but the hosting server doesn’t work, when I try to run it gives me an error of the system itself: Diretório temporário /tmp…
-
0
votes3
answers643
viewsQ: How to mount the regular expression below
I’m trying to put together a regular expression and I’m not getting it. How do I mount a regular expression that only accepts numbers, bar, and hyphen?
-
1
votes1
answer762
viewsQ: Show typed text in a text field after clicking button
The code below I got from the Internet is working for me. In the main, it executes a form with the name to type and the button ok. I wanted to run, no main, shortly after the new MeuPrograma(); one…
-
6
votes4
answers5900
viewsQ: How to receive form data with pure HTML?
I created a simple form. In it I put: <form action="02.html" method="get" name="meu_formulario"> <input type="text" name="nome" size="60" maxlength="40"/> </form> I want to create…
-
1
votes1
answer41
viewsQ: how to make a Join Inner picking up the description
my tables: agencias (id, nome_agencia, ads -> FK pra tabela de baixo) ads (id, nome, agencia -> essa é FK pra tabela anterior) the problem is this: each agency will have an ads in the ads has…
-
4
votes1
answer2259
viewsQ: How to send an object by parameter?
I have the following code snippet: <p:selectOneMenu id="agencia" converter="agenciasConverter" value="#{agenciasMB.agencias.agencia}" style="width:150px"> <f:selectItem itemLabel="Selecione…
-
2
votes2
answers99
viewsQ: mysql autoincrement restarts alone
I am with the same problem described here on this link: http://forum.novosga.org/discussion/26/erro-ao-reiniciar-a-senhas the guidance given was to do this here:…
-
0
votes1
answer124
viewsQ: How to download a PDF that is in C:
With the code below I can download a JPG, but with PDF does not work. I tried to change the last line for that, but it didn’t work either. file = new DefaultStreamedContent(stream,…
-
0
votes1
answer448
viewsQ: pdf download that is outside the java jsf application
need to download some pdf that are outside of my application, are in the folder c: tmp\ how could I use primefaces to make these files available for download? I thought of saving in folder C:…
-
3
votes3
answers228
viewsA: I need an explanation about what a code I don’t understand does
It is on a table that in a dot line of one color and in the next line of another color and alternate.
-
0
votes1
answer764
viewsQ: how to print a text on multiple pages using Jasper Reports
I have this report in the observation field has a text coming from the database only that it prints on a single page, cutting the rest of the text (if it has a lot of text) how do I print on more…
-
0
votes1
answer179
viewsQ: need to put an extra left Join in this query
My code is below he returns me "h. banks as banks" with a number, which is foreign key I want him to return me to the description of this bank, only that in many cases, h.banco returns me as null…
-
3
votes2
answers3255
viewsQ: I need to return the null values of this Inner Join
I have this select mysql: SELECT credor.nome, banco.descricao FROM credor INNER JOIN banco ON (credor.banco = banco.codigo) He returns me all the creditors and their respective bank, but if the…
-
0
votes0
answers85
viewsQ: Problem using "Frozen Columns" in Primefaces
I’m using the first faces with frozenColumns, in this way: <p:dataTable id="dataTable" var=.... scrollable="true" scrollWidth="800" frozenColumns="1"> Only when it breaks the line, the Frozen…