Posts by Willian Coqueiro • 599 points
62 posts
-
0
votes0
answers67
viewsQ: Next composite primary key ID
I have the following example structure for the people table: CREATE TABLE `pessoas` ( `i_entidade` int(4) UNSIGNED NOT NULL, `i_pessoas` int(11) UNSIGNED NOT NULL, `nome` char(60) COLLATE…
-
0
votes1
answer126
viewsQ: Reverse path hash_hmac
It is possible to do the reverse path of the following function? hash_hmac('sha512', $password . $user_salt, $this->salt) I am recovering user from an application to a new one and need to recover…
-
0
votes1
answer1254
viewsQ: Solve family tree with PROLOG
I’m having a hard time making relationships. Follows the table: homem(jose). homem(ananias). homem(helio). homem(jurandir). homem(valdir). homem(delio). homem(fabiano). homem(willian). homem(diego).…
prologasked Willian Coqueiro 599 -
1
votes1
answer791
viewsA: I need to change the border color of a datatable cell
I got the solution by adding inside columnDefs: columnDefs: [ { targets: 0, createdCell: function (td, cellData, rowData, row, col){ $(td).css('border-radius', '4px'); $(td).css('border-left', '4px…
-
2
votes1
answer791
viewsQ: I need to change the border color of a datatable cell
I need each cell in the first datatable column to change color as the table is scaled. The color will be defined as the table data is generated in the back-end. Below is an example of how accurate:…
-
0
votes1
answer41
viewsQ: I calculate hours discounted weekends
I am implementing in an application the time when a data was created in the database. This date information is created by the native function of the php time() that generates a value that is…
phpasked Willian Coqueiro 599 -
2
votes1
answer81
viewsA: SELECT using php
If I understand correctly, you want to take values from a select multiple there’s form, right? In this case you should interact with array in php. HTML: <form action="pagina.php" method="GET">…
-
0
votes1
answer540
viewsQ: Codeigniter - Only one line of a LEFT JOIN
I have a table that is related by the id of the other. One contains the document data, the other contains the images related to the document. More precise that in this specific query only the first…
-
-1
votes1
answer937
viewsQ: Query in Json file
I’m making a list of cities and states via JSON. I always create a table in the database to return this information. But today I’m making direct to the file JSON. The layout of the states file:…
-
0
votes2
answers501
viewsQ: Jquery Datatables filter for full phrase
I’m using Jquery datatables, I always use it, but today I have a situation that I did not find in his documentation. And the following, when the query is done it brings me the value of several…
jqueryasked Willian Coqueiro 599 -
0
votes1
answer209
viewsA: Ajax does not work
Leave only one Jquery library loaded. And your Javascript script should look like this: <script> $("a").live("click", function(event) { var targeturl = $(this).attr("link"); $.ajax({ type:…
-
-1
votes1
answer569
viewsQ: Software to create templates
I started programming in WEB languages a few years ago. I do more full Server-side and front-side changes like javascript, Jquery, Angular, html. But I have difficulty creating templates for…
-
2
votes1
answer114
viewsA: A route forever the same controller plus several functions
I decided as follows: $route['admin/concursos'] = 'admin/concursos/concursos'; $route['admin/concursos/(.*)'] = 'admin/concursos/concursos/$1'; The first route indicates that whenever you use url…
-
1
votes1
answer114
viewsQ: A route forever the same controller plus several functions
I have the following link meusite.com/admin/concursos/concursos. My folders inside the controllers are like this: -admin +atos -concursos ->concursos.php +licitacoes This link takes the function…
-
1
votes1
answer913
viewsA: Filter Select elements with PHP
<div class="grupo"> <!-- class="borda select2_single form-control comboauto" --> <select name="id_projeto" id="id_projeto" class="borda select2_single form-control "> <option…
-
1
votes1
answer233
viewsA: Send file to another server using Codeigniter
I solved the problem with the class FTP of codeigniter which is the framework I’m using. I set the second connection of the database to my home and right after inserting, editing or deleting the…
-
0
votes1
answer233
viewsQ: Send file to another server using Codeigniter
I have a Web System that I’ll switch to a hosting. But I have the system with 2 banks (one for the site and the other is in my house for the path of the files, documents, logs, etc), the script will…
-
1
votes1
answer1091
viewsQ: How to use Bootstrap template
I wanted to use the Gentelella template. I even looked for explanations but I couldn’t find. I need to replace an admin panel that I created a few years ago with a newer one. And I saw this…
-
1
votes2
answers1140
viewsQ: Return last record of each object
I have the following table: imovel ano | id | item | valor Records: 2000| 1 | 201 | null 2001| 1 | 211 | 10 2002| 1 | 202 | null 2000| 2 | 201 | null 2001| 2 | 221 | 17 2002| 2 | 211 | 14 2000| 3 |…
-
1
votes1
answer131
viewsQ: How not to affect next elements of the same tag
I have a horizontal menu with several elements <li>. But as the mouse on the last item, namely on the last item <li> - "Services", opens another list of items that also contains elements…
-
0
votes1
answer1934
viewsQ: Always redirect to HTTPS with Codeigniter
I have an application with Codeigniter and always need to force the connection redirect to https. I did it this way: I changed inside config\config.php the line $config['enable_hooks'] for TRUE.…
-
1
votes1
answer614
viewsQ: Codeigniter Administrative Area Controller
I am developing a website with administrative area. I started it with the new version of Codeigniter 3.1.5. In the main pages would be body of the site, already in the news pages the url would be as…
-
0
votes1
answer89
viewsA: Download database file via php
In my case as I use Xampp it by default limits the amount of query data, so in the file php.ini on the line odbc.defaultlrl = 4092 I changed its value to 10mb which corresponds to 10485760 bytes.…
-
0
votes1
answer89
viewsQ: Download database file via php
I have a system that I didn’t create, the bank runs on sybase driver-like odbc, the php accesses everything with odbc, I need to download Pdfs that are recorded in this database in the type file…
-
0
votes2
answers178
viewsA: How to add image upload to this php code?
I use the very functional and simplified Phpmailer class. I have this example for one or multiple recipients: <?php require("class.phpmailer.php"); require("class.smtp.php"); $anexoemail =…
-
0
votes3
answers815
viewsA: How to change page content according to the end inserted in the link (URL)?
Look you can use it like this: www.teste.com.br?pagina=user&id=123 This way you put one if inside the index with a $_GET the page you want to view, if it’s the user page, click it with include…
-
0
votes2
answers211
viewsQ: Dynamic search for selection
I need to in a text field by clicking the F2 key to open a query window and selecting the employee to take code from it to the text field. Would you have some library in jquery or other solution?…
-
0
votes6
answers393
viewsA: If it doesn’t work
To compare dates should be used like this: If(strtotime($hoje) >= strtotime($data_senha)){ }
-
2
votes2
answers228
viewsA: Accept pennies in a javascript code
Amigo use parseFloat(var.toFixed(2));. Example: var valor = 10000.100000; var arredondado = parseFloat(valor.toFixed(2)); Return 10000.10
javascriptanswered Willian Coqueiro 599 -
1
votes1
answer55
viewsA: Problem with accents when inserting a personified field in the wordpress panel
Do it like this: $nome_completo = utf8_encode($_POST['nome_completo']);
-
1
votes0
answers147
viewsQ: Serialize does not load after Ajax request
I have a query that brings the result of the database to a table that at each row of the result has option to edit, until then the query and run normal, after clicking edit it loads the function…
-
1
votes1
answer821
viewsQ: Return php result to javascript
I’m making the POST request by AJAX: HTML FORM (administration.php): <form align="center" width="50" name="excluir_documento" id="excluir_documento" onClick='return confirma_excluir_documento()'…
-
0
votes1
answer695
viewsQ: Run function without refresh and return function data
I need to run a PHP function that will generate a zip file, write to the database if it was generated and the date. And right after returning the warning that was generated. At the moment I already…
-
2
votes2
answers2202
viewsQ: Update of several records together with select
I need to do UPDATE with SELECT for several records, today I am with this query: UPDATE banco.ordem SET valor = (SELECT (CEILING((litros * 3.67)*100)/100) AS valor_litros FROM banco.ordem WHERE…
-
1
votes1
answer63
viewsA: Conversion from php form to smtp
Attention should be paid to smtp authentication: $mail->SetLanguage("br"); $mail->IsSMTP(); // Define que a mensagem será SMTP $mail->Host = smtp.seudomínio.com.br; // Endereço do servidor…
-
2
votes2
answers109
viewsA: How to show latest date data?
You can do it all in a single select: SELECT * FROM tabela1 ORDER BY data DESC LIMIT 1
-
1
votes1
answer594
viewsQ: Compare array values with variable
I need to add values from an array and compare them to a value from a variable. Ex: array(1000, 1000, 3000, 5000,); $var = 4000; In this case one must add up within the 1000+3000 array, then 4000…
phpasked Willian Coqueiro 599 -
2
votes1
answer107
viewsQ: Reload while while giving Submit
I have the need to when load all the content defined in the database query to each while and fill in the fields and give Submit, it record in the database and reload only that loop bringing me the…
-
-1
votes2
answers1898
viewsQ: Perform function from the same class
I have tried several forms here on the site and on the net, no more loads the other function. I have a form that when sending it loads the class and Function: class editar { public function…
-
1
votes2
answers114
viewsQ: Sending email to multiple recipients
I’m using sendmail, the problem and the following. Use checkbox to mark recipients. How do I make it so that when I check the checkbox it fills a variable with each recipient, the comma and the next…
-
-3
votes1
answer33
viewsQ: Error while running Function on another file
Inside the insert.php file I have a function that validates sending to the database and then sends a return email, the problem that when checking the send.php file that will execute the code of the…
phpasked Willian Coqueiro 599 -
0
votes2
answers797
viewsQ: Open modal window with php function via JS
I need to click a button, open a modal with a form for inserting data in mysql. I’m adapting a code I used earlier to display iframe, but when modal opens it shows the page inside the iframe with…
-
0
votes1
answer191
viewsQ: Change column of txt
I need to change the content of a column with javascript, so I don’t need to use php with apache. Since it would run with html and javascript. It would be a file with 10 columns and only modify the…
javascriptasked Willian Coqueiro 599 -
1
votes1
answer1015
viewsQ: Sum of xml file values
I need to make a sum of values of an xml file. How little I’ve worked with Curl extracting data from another file or page, I don’t even know how to start. the file layout would be this.…
-
0
votes1
answer98
viewsQ: Error checking result of variables with Else and if
I’m having a problem returning an authentication message on a login page. Specifically and where it checks that the login and password field are checked as TRUE, if yes and the user does not contain…
-
2
votes1
answer2742
viewsQ: Problem with php special characters
I’m using php on the html page to validate a form. When the database retouches the text to the page php is not displaying the result with special characters. Where is the error? Page: <meta…
-
-1
votes1
answer1381
viewsQ: Validating form for the same page only by clicking
In this code I will use it on the same page so that the result returns to the same, how do I validate the form only when click on the button submit? The code below on the same page returns the error…
-
0
votes1
answer217
viewsQ: Problem uploading with php
I am uploading php to the server. At first it worked perfectly. The problem is that now when it uploads to the folder on the server it changes the name. <?php try { if (…
phpasked Willian Coqueiro 599 -
4
votes1
answer2612
viewsA: Insert file path in mysql
I got what I wanted this way: 1º In HTML insert: <input name="arquivo" type="file" id="arquivo"> 2º In PHP I used the code to save the file in a specific folder:…
-
-1
votes1
answer2612
viewsQ: Insert file path in mysql
I need to insert a file .pdf by page and write in the database only the file path. The user uploads and writes. The file goes to folder specifies and the Mysql database only gets the path. Follows…