Posts by Thiagosilr • 643 points
22 posts
-
1
votes1
answer34
viewsA: Elements inserted via . html() and jQuery key action
How you are entering an element in the DOM dynamically, and the association of the event keyup was done before the element exists, it is not executed. Change the line:…
jqueryanswered Thiagosilr 643 -
2
votes1
answer40
viewsA: Null Arriving Object List in Controller
Your controller expects a list of objectives. The way you are assembling input names is only sending a single object. Simply modify the names of the inputs by grouping them. Ex: [0]. Mes @model…
-
-1
votes1
answer115
viewsA: How to make a function to format a number of followers?
Other solution if you do not want to use number_format why it rounds the value when formatting it. <?php function formatarSeguidores($numero, $numeroDivisao) { $numero = $numero / $numeroDivisao;…
phpanswered Thiagosilr 643 -
5
votes3
answers1926
viewsA: How to put a php variable in a mysql query?
In PHP when you have a string wrapped with double quotes. The PHP interpreter will scroll through it and check if it has no variables to replace. <?php $tabela = 'Tabela1'; $data = '2018-06-20';…
-
3
votes1
answer5466
viewsA: How to test connection to SQL Server database
Create a new blank txt file on your computer that you would like to test: And then change your extension to . udl: Run this file and you can test the connection to the database:…
-
1
votes1
answer126
viewsA: I would like to know how I can make a select with every Friday of the year in mysql for example
You can build an algorithm that gets you every Friday of the year and then enter the dates in the database. Follow an example in PHP that gets the dates: <?php # Ano a qual deseja obter todas as…
-
1
votes1
answer166
viewsA: Calling.html file from a function
Just use window.Location to redirect. <!DOCTYPE html> <html> <head> <title></title> </head> <body> <a href="#"…
-
0
votes1
answer440
viewsA: What should I change in Git for Git Bash to open in my project directory in windows 10?
Just remove the following statement from the Target field. And point to the default directory as you did in the "Start at". --cd-to-home…
gitanswered Thiagosilr 643 -
2
votes1
answer923
viewsA: How to Create Event in MYSQL?
Syntax is correct. Probably the scheduling service is stopped. Query to check service status: SELECT @@EVENT_SCHEDULER; Activating the service: SET GLOBAL event_scheduler = ON;…
-
2
votes3
answers2286
viewsA: How to remove duplicate values from a multidimensional array in javascript?
You can go through the array and for each position go through it again by checking the duplicity. If you can’t find duplicity add the value in a new array. var dados = [ ['maria', 'telefone',…
javascriptanswered Thiagosilr 643 -
2
votes1
answer140
viewsA: Limit the number of results of a real-time UNION sub-query for performance improvement
Analyzing your complete query does not need you to use UNION. Note that the data selected in the two querys are the same (Selects the same table itens_conta and the same joins). So if we run the…
-
1
votes1
answer34
viewsA: Check if there is duplicate value in while
You can solve in your query by grouping the weights. And counting how many of the same exist. Ai in PHP you compare if the repetition is greater than 1. SELECT peso, COUNT(peso) AS repeticoes FROM…
phpanswered Thiagosilr 643 -
1
votes1
answer122
viewsA: Difficulty listing a invoice and products using PHP and Mysql
The problem is occurring on the following line: foreach ($pdoo->query($sqll)as $row) { Just replace it with: foreach ($dataa as $row) { I looked here and there is another problem. You want all…
-
1
votes1
answer1092
viewsA: Mysql - Separating line values into multiple lines
Consulting some references to be able to split a string in Mysql, I arrived at the following precedent. Which will traverse the entire table you quoted, dismember the values from the "Pens" column…
-
0
votes1
answer416
viewsA: Make datepicker date range to be used in mysql
Good night Renata, As you are working with PHP. You can simply perform the form Ubmit. And in the script that receives the request split the string to get the two dates. And later mount your query.…
-
0
votes1
answer636
viewsA: Scroll Javascript in div and catch title
Example using jQuery: $(document).ready(function() { // Escuta o movimento do scrool. $('#div_scroll').scroll(function() { // Obtem a posição do elemento div_scroll na tela. var divScrollPosition =…
-
1
votes2
answers310
viewsA: Show or Hide modal with sessionStorage
That’s how Rodrigo responded. How you’re using Bootstrap follows an example to complement. It is interesting to check if the browser supports Storage so as not to disturb the rest of your script.…
-
1
votes1
answer1611
viewsA: Mysql UPDATE with JOIN and WHERE
UPDATE TRABALHA T INNER JOIN COMPANHIA C ON ( C.Cod_Comp = T.Cod_Comp AND C.Nome_comp = 'Teste' AND T.Cod_Emp = T.Cod_Emp_Supervisor ) SET T.Salario = T.Salario + (T.Salario * 0.10) From what I…
-
2
votes1
answer808
viewsA: Select to compare value sets from columns of two tables
SELECT T2.ID, COUNT(T1.L1) AS 'Count' FROM Tabela2 T2 LEFT JOIN Tabela1 T1 ON ( CONCAT('[', T2.L1 ,']','[', T2.L2 ,']','[', T2.L3 ,']','[', T2.L4 ,']','[', T2.L5 ,']','[', T2.L6 ,']') LIKE…
-
3
votes5
answers7505
viewsA: How to make the font size automatically fit the size of a div
$(document).ready(function() { $('#conteudo').textfill({ maxFontPixels: 12 }); }); #conteudo { width: 300px; height: 300px; border: 1px solid red; } <script…
-
1
votes1
answer672
viewsA: Dropdown menu dynamic html
$('select').change(function() { $('.item').hide(); $('.item-' + $(this).val()).show(); }); .item-vehicle, .item-animal { display: none; } <script…
-
3
votes2
answers179
viewsA: Enabling fields (array) with Jquery when checking checkbox
$(document).ready(function() { $('input[type=checkbox]').click(function() { var campo1 = $(this).next(); var campo2 = $(this).next().next(); if ($(this).is(':checked')) { campo1.attr('disabled',…