Posts by Wagner Fillio • 1,328 points
143 posts
-
-3
votes2
answers26
viewsA: Join Mysql Tables with similar field names
For this you would need in thesis, use Inner Join. INNER JOIN selects records that have corresponding values in both tables. Through this example, you will get where you want. See working on…
mysqlanswered Wagner Fillio 1,328 -
-1
votes1
answer42
viewsQ: Update with subconsultation and Inner Join - Mysql
Tables Contract id, contract, credit_id, debtor, evento_id, campanha_id Title id, contrato_id, title, maturity, value The idea is to update the field campanha_id of contracts using a sub-allotment…
-
1
votes2
answers71
viewsA: filter object array based on string array
Maybe you want this: Parameters for research: Array Filter Array Includes const products = [ {id:1, name: 'product 1'}, {id:2, name: 'product 2'}, {id:3, name: 'product 3'} ]; const newProduct =…
-
0
votes1
answer22
viewsQ: PHP filter and listing field
I would like to list the data filtering by the form fields and if nothing is sent, I would like to not display results. php. <div class="row container"> <div class="col s12"> <h5…
phpasked Wagner Fillio 1,328 -
0
votes1
answer47
viewsQ: Override preloader div to a Section element
I need to add a div preloader at the centre of an element article! I don’t want this preloader to expand into the whole body, because the laterial menu is static! So I want him to occupy only the…
cssasked Wagner Fillio 1,328 -
1
votes1
answer135
viewsQ: Tranche maturity by period
The excerpt of the code below displays a simulation of installments, with fixed due date, divided every 30 days! I’d like to include a salary periodico, for example every 20 days, or 10 in 10,…
phpasked Wagner Fillio 1,328 -
0
votes3
answers452
viewsA: Javascript - If and Loop
You might want to consider using filter, so a new array will be created only with the results that fit your condition! var moradores = [ "Fulano de Tal", "Beltrano da Cia", "Viajante do Tempo",…
-
0
votes1
answer15
viewsA: Error printing Owner.screenname and Owner.url (Dailymotion Data API) property value
Using the same code, but in javascript puro, I got results. Copy and paste this code into the console in the browser and you will see the result. Turns out you’re giving console.log() in all…
-
0
votes3
answers47
viewsA: Run javascript without calling in html
Try the following <div id="top" style="height: 50px; width: 50px; background-color:red"></div> <script> window.onresize = function() { const top = document.getElementById('top');…
-
1
votes1
answer63
viewsQ: Add html elements with Javascript using loop
Hello, Through a objeto, I need to create elements HTML using the loop javascript. In the example code, and as the print, I realize that when adding batches (lotes), an item is also added undefined.…
javascriptasked Wagner Fillio 1,328 -
1
votes1
answer73
viewsQ: SUM() in a clause Where - Mysql
The query below brings results of a contract, whose contract delay is between 1 and 487 days. Now I want somar the values of faturas pertencentes to the contract invoice.value and then filtrar for…
mysqlasked Wagner Fillio 1,328 -
0
votes1
answer143
viewsQ: Create array to validate duplicate CPF in a PHP Loop
My primary goal is importar data of a planilha em Excel to the Mysql using PHP. I completed this goal and can already import all columns from Excel to the respective tabelas of the database! My next…
phpasked Wagner Fillio 1,328 -
0
votes1
answer154
viewsQ: MYSQL - add column and calculate days late of a date and sort by the longest delay
Hello, Suppose I have a table tb_fatura with the following fields and values: id | transacao_id | valor | vencimento 1 | 1 | 1109.97 | 2020-02-19 2 | 1 | 10, | 2019-05-01 I want somar the column…
-
0
votes1
answer47
viewsQ: Return portions of an array by full (string)-PHP
Hello, I have a array of plots, and I want to return by extenso, briefly to quantidade de parcelas and the valores. Example Entrance of R $ 15,00 + 3 installments of R $ 15,00 In my test code, I…
phpasked Wagner Fillio 1,328 -
1
votes1
answer120
viewsQ: jQuery for Pure Javascript (use export Function ES6)
This script capitalizes the first letter of each word, except for a few words that are part of the matrices in the variables wordContainAt, wordsToIgnore, wordUpperCase. I’m having trouble…
javascriptasked Wagner Fillio 1,328 -
4
votes3
answers717
viewsQ: Ternary operator with three possible conditions
For a certain status, I can have 3 different stages: 0 = Stopped 1 = Sending 2 = Delivered Then you could have: status = 0 or status = 1 or status = 2 For each stage, I need to set an icon. If I had…
javascriptasked Wagner Fillio 1,328 -
-3
votes1
answer45
viewsQ: Module Help - Native Javascript (ES6)
I need a simple help with javascript modules, I am studying and I have many questions. In my example, I charge Fetch.js, which is a unique file that I use to make requests, GET, PUT, POST e DELETE,…
javascriptasked Wagner Fillio 1,328 -
2
votes2
answers78
viewsQ: Using Promise Javascript
Hello, I have a requisition GET in Jquery, to load a page HTML; and if the page does not exist, then displays in the container a <div>erro 404</div. The Jquery request works well. Jquery…
-
1
votes1
answer126
viewsQ: Scroll horizon on Nav-tabs component (bootstrap 4)
I added a scroll horizontal on the component nav-tabs of bootstrap 4. Now I want the scroll function automatically if I click the last tab visível, and show the next tab that is off the display.…
-
4
votes0
answers94
viewsQ: Module Pattern Javascript
I don’t know if I’m applying the concept of modular javascript correctly, so I need help! I sorted the files js for responsibilities. Each file will be assigned to a certain function. I’m uploading…
javascriptasked Wagner Fillio 1,328 -
0
votes2
answers246
viewsQ: Query Mysql to count contracts with INNER JOIN
Hello, relating the following tables: Contract table tb_contrato id credor_id num_contrato Invoice Table tb_fatura id contrato_id num_fatura dt_vencimento valor Parameters credor = 1 valor inicial =…
-
0
votes3
answers120
viewsA: Add an item to an array that is inside another array?
Or you can try too: let object = [1, 2, 3]; console.log('antes: ' + object); item = 10; object.push(item); console.log('depois: ' + object); update let logDebug = []; logDebug.push({ value : [] });…
javascriptanswered Wagner Fillio 1,328 -
0
votes1
answer90
viewsA: HOW TO CALCULATE PERCENTAGE WITH MYSQL
To begin, you would need to create a PHP query that shows you the amount of table records. I created a very simple example of how you can do, using 3 queries for you to better understand. I suppose…
-
-1
votes1
answer193
viewsQ: Import excel to multiple tables - PHP and MYSQL (codeigniter)
Hello, with the function below, I can import the data from an excel spreadsheet to the database, via PHP. To tables client contains the following fields: `id` INT(11) NOT NULL AUTO_INCREMENT, `name`…
-
-1
votes1
answer71
viewsQ: DIV SLIDER BOTTOM CSS
Hello, I intend to use the same code I created in this example jsfiddle, so that the DIV that is hidden, instead of appearing from the top, footer trim (from bottom to top). Take this example by…
cssasked Wagner Fillio 1,328 -
0
votes1
answer76
viewsQ: Popular and select a Select (Dropdowlist) option - jQuery - json
Good afternoon! In an ajax query, I get an object objectAccount, and in this object there is an array, containing a list of banks I’m populating the select account-bank with the data obtained in…
-
0
votes2
answers135
viewsQ: Make words of an uppercase array - jQuery
Hello, With code below, I make the first letter of any word uppercase, except the words that are in the array wordsToIgnoreand wordContainAt. Now I thought to update the code and include an array…
-
0
votes3
answers85
viewsQ: QUERY LEFT JOIN - MYSQL
Hello, Check out this query: SELECT `permission`.`visible`, `menu`.* FROM `tb_permission` `permission` LEFT JOIN `tb_menu` as `menu` ON `menu`.`id` = `permission`.`menu_id` WHERE…
mysqlasked Wagner Fillio 1,328 -
0
votes1
answer199
viewsA: Display menu according to user permission - Codeigniter - PHP
I arrived at the expected result using the following: I still think there may be other options, if anyone can disclose, I’d appreciate. // in test - check only type functions start…
-
0
votes1
answer199
viewsQ: Display menu according to user permission - Codeigniter - PHP
Hello! I am developing a panel to create and change user permission using the plugin jstree. This works well for me once I use a table called treeview to mount the tree of jstree and use the table…
-
0
votes1
answer60
viewsQ: Create layout with`content` responsive
I’m developing a layout, but I need help. I want to create a content fit the page. sample code. <!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="utf-8"> <meta…
-
0
votes1
answer965
viewsA: Call header and footer without mixing php in html
You can do it using javascript Imagining that your index.html be it so. Create in the same directory as index.html a file called header.html and footer.html. Tested on the server vertrigo. You will…
-
0
votes1
answer143
viewsA: Can I use many IF’s in PHP?
No problem using several ifs However, in this particular case of yours, I also have the option of using a switch case, you can also choose to use operador tenário Example: How would it be in IF $z =…
-
0
votes1
answer15
viewsA: Codeigniter - REST_SERVER and Datatables (plugin)
I don’t know why this happens, but the problem is in the session configuration. I solved the problem by changing the following file line config.php BEFORE $config['sess_expiration'] = -1; NOW…
-
1
votes1
answer1086
viewsA: How to make Maskmoney correctly load value in input when entering page
Hello, you might want to work with another library. UPDATE Added example with library MaskMoney example jsfiddle $(function () { console.log('init app'); $('#UpUltimoSalario').val('3.555,00');…
-
1
votes1
answer15
viewsQ: Codeigniter - REST_SERVER and Datatables (plugin)
I’m having a problem using the library REST_SERVER and the plugin datatables. The controller is ok, the problem is in Ajax authentication, because if I use the first request Ajax, as below, I can…
-
-1
votes2
answers581
viewsQ: Return True or False $.ajax(). done
Hello, Using a change of venue ajax this way, I can return true or false. /** ## AJAX ## **/ function getAccountAjax(id, metodo) { let bool; $.ajax({ type: 'GET', async: false, contentType:…
-
0
votes1
answer53
viewsQ: Function to display last seen (current date)- Jquery
Hello, Through the function below, I intend to display the last seen. However, it is showing the last month, instead of showing the current month. For example, I am sending the current date but is…
-
0
votes2
answers71
viewsQ: Alert when scroll reaches top of page
In the code below, the alert is triggered when the scroll arrives at the end. $('#messages').scroll(function() { if ($(this).scrollTop() + $(this).height() == $(this).get(0).scrollHeight) { alert('a…
jqueryasked Wagner Fillio 1,328 -
1
votes1
answer315
viewsQ: Position: Sticky CSS or JS
Hello, Following exactly the example below, someone can help me to work the position:sticky Today, the next date is standing on top of the current date. In this way, the opacity and shadow of the…
-
3
votes2
answers84
viewsQ: Group Messages by PHP date, Jquery
Main fields MYSQL id, message, date I would like it to be displayed this way in the chat 26/02/2019 - message 1 27/02/2019 - message 2 - message 3 In a way I managed to group by date, below is the…
-
0
votes1
answer125
viewsA: Getting no answer Socket IO
Problem solved, the return json was like string, I added header('Content-Type: application/json'); on the return PHP and succeeded.
-
1
votes1
answer125
viewsQ: Getting no answer Socket IO
Hello, Can you please tell me where the mistake is ? I created a file in the root folder, server.js var socket = require( 'socket.io' ); var express = require('express'); var app = express(); var…
-
0
votes1
answer90
viewsA: Authenticate AJAX Request - PHP
Maybe there’s another way, but I solved it this way: In the ajax request, I sent it as follows, including the headers: {'X-Header': ''},: let id = 1; $.ajax({ type: 'GET', async: false, contentType:…
-
1
votes1
answer90
viewsQ: Authenticate AJAX Request - PHP
Using as example the request below and using as parameter the id, I got the return as expected Ajax let id = 1; $.ajax({ type: 'GET', async: false, contentType: 'application/json', url :…
-
1
votes1
answer99
viewsA: Codeigniter/PHP - Problem sending Model Data to View
You can try this way. controller public function reenviar_senha() { $email = $this->input->post('email'); $this->load->model('usuario_model','usuario'); $retorno =…
-
0
votes1
answer96
viewsA: Copy data from a new Mysql record
I made a small example, I believe that with it I can have an idea. <?php /* tentativa de conexão com o servidor MySQL. Assumindo que você está executando o MySQL servidor com configuração padrão…
-
1
votes2
answers467
viewsA: How to make a query using variables with PHP
Buddy, I don’t know how you’re getting the value of LoginName1. But I suppose you have this value somewhere on your page (either via Session or database) And for using innerText, may be in some text…
-
1
votes2
answers535
viewsA: Does Datatable work with Database Search?
Take this example: The library datatable works with PHP, either pure or using framework. It would be a bit extensive to write a code here to represent the functioning. But with little research, it…
-
3
votes3
answers44
viewsA: jQuery does not format the date field
Using the jQuery-Mask-Plugin <html> <head> <title>Teste jquery data</title> </head> <meta charset="utf-8"> <script…