Posts by Cleo • 348 points
22 posts
-
2
votes1
answer546
viewsA: Can a foreign key be part of more than one table?
@Lone Tomberry, not only can, but should. Foreign keys or Foreign key, as they are commonly called ensure the integrity of a database data. Note the type of relationship between your tables. The…
-
0
votes4
answers572
viewsA: Generate Excel report by filtering query in Mysql database
Got it. Here is an example of a query with parameters: $search_ID = 1; $search_product = "PD1001"; $query = "SELECT id, product_code, product_desc, price FROM products WHERE ID=? AND…
-
0
votes4
answers572
viewsA: Generate Excel report by filtering query in Mysql database
@Mauricio3012. Your code makes no sense. You pass the variable as a function parameter $arrayRow. In the code snippet below, you pass its value to another variable, but in no time, use it: $arr[] =…
-
1
votes2
answers259
viewsA: Insert Select Sql Server
@Junior Torres the presentation order does not influence anything. But if you want to display them in an organized way, you can utilize the instruction order by. In your case it would look like…
-
0
votes1
answer187
viewsA: Error creating a table in mysql
Put the creation statement of Foreign Keys separate from table creation: CREATE TABLE EPI ( CODIGO__EPI INTEGER NOT NULL PRIMARY KEY, USUARIO_CODIGO_USUARIO INTEGER NOT NULL,…
-
0
votes2
answers40
viewsA: Difficulty with Select
You need to remove your Where condition Qnt_de_pns > 3. Thus: SELECT DISTINCT Predio, Local, Produto, count(Produto) Qnt_de_PNs FROM Controle_Prod_P_Local_E_Predio WHERE Local BETWEEN ('LOCA"')…
-
0
votes3
answers104
viewsA: Doubt with sql Inner Join in multiple tables
@Felipe Paz... this happens because the relationship of photos with advertising is many to one (n:1). In this case, you can do as follows: SELECT `anuncios`.`id_anuncio`, `anuncios`.`id_user`,…
-
1
votes3
answers237
viewsA: How to send Jquery variable content to an html textarea?
It can be something with your xml tags. In this case, try to do so: $("textarea#ctext").html(xmlString); If it doesn’t work, post the result of: console.log(xmlString);…
-
2
votes3
answers3104
viewsA: Why does GROUP BY not work with Mysql in this case?
You can use the instruction DISTINCT. It basically works as a GROUP BY of all fields, eliminating duplicate records, but without the need for any aggregation function, as is the case for you.…
-
0
votes2
answers1411
viewsA: Open/Run input file - jQuery
Put your inputfile on the page inside the class div .hiddenfile HTML <div class="hiddenfile"> <input name="upload" type="file" class="imginput" id="#fileinput" /> </div> Adds a…
-
-1
votes1
answer151
viewsA: kill all netbeans processes at the same time
If you are using Windows, you can do this by prompt using the command: taskkill /f /im [nome_do_processo]
-
0
votes2
answers1191
viewsA: PHP open modal with results
I took the liberty of making some changes to the function, I believe it is more coherent. I changed the HTTP method to POST. Also note that I gave a.log console to the return data, so you can see…
-
1
votes2
answers342
viewsA: Mask SQL Select return
Consider that syntax may vary according to DBMS. Here are some examples: SELECT 'Texto' + cast(id as varchar(250)) FROM tabela (MS SQL SERVER) SELECT 'Texto' || id FROM tabela (FIREBIRD) SELECT…
-
0
votes1
answer117
viewsA: How do I edit the scroll bar of a select tag?
Very simple... Just use the backgroud and color attributes of the element. In this case it would look like this: #select{ background: red; color:#fff; }…
-
-1
votes2
answers81
viewsA: How to check dates in Javascript?
Your job should look something like this... function autenticarDados(){ var dataI = new Date(document.getElementsByName("dataIni").val()).toDateString(); var dataF = new…
javascriptanswered Cleo 348 -
1
votes1
answer262
viewsA: SQL group by returns duplicated POSTGRESQL
I do not know the structure of its tables, which makes the analysis a little difficult but, revise the following points: Relationship a. id_loja = u.id.. A user is a store ? If the answer is no.…
-
0
votes2
answers108
viewsA: How to Give Get in Response Status
@Everton... You have to explicitly that the return will be a json. $.ajax({ type: 'POST', url: '../includes/subscribe.php', data: values, dataType: 'json', success: function (resp) { if (resp == 1)…
-
-2
votes1
answer2928
viewsA: No Qualifying bean of type found for dependency
Hello. All right ? Where is the implementation of the Categoriarepository interface ? It is in it that you should note with @Repository with that Spring will know which implementation it should…
-
7
votes2
answers1171
viewsQ: Entitymanager or Session? What to use?
I have worked with projects that used both Session and Entitymanager but it was never clear which one to choose. On what basis they differ in terms of performance and compatibility. Someone can give…
-
1
votes2
answers341
viewsA: Error updating the entire JAVA table
Hi. I think I found the problem. It’s in your query. Do it this way: @Transactional public void alterarPrecosValorRealPorCategoria(ProdutoFiltro filtro){ try { Query query =…
-
2
votes2
answers739
viewsA: Problems with Hibernate Lazy
Hello. The problem is how Hibernate will treat the relationship between your classes. You used the attribute fetch = Fetchtype.LAZY. With this he does not "magically pick up" the list of related…
-
2
votes0
answers558
viewsQ: java.lang.Nosuchmethoderror: org.jboss.logging.Logger.debugf. Glassfish 4.1, Hibernate 5.2, Spring 4.3
I cannot upload an application to Glassfish 4.1. It seems to me that the problem is dependency org.jboss.logging I already added it to the project in version 3.3.0 but the error persists. The…