Posts by Euler01 • 1,195 points
42 posts
-
1
votes1
answer65
viewsA: Error going through table html with jquery
Using in this way $('.chkProcessmentDiary') you will always catch the first checkbox, Voce have to search the checkbox inside the tr that is in the iteration. So: table.find('tr').each(function…
-
2
votes1
answer219
viewsA: Multiple printing with checkbox
First thing changes your checkbox like this: <input type="checkbox" id="imp_lote" name="imp_lote[]" value="<?php echo $row_solicitacao[" sol_visita "]; ?>"> Code generating the portfolio…
-
1
votes1
answer28
viewsA: Doubt with this query
All right, let’s go. select is divided into 3 parts, let’s go through the two internal selects. BLUE - Search quantity (SUM) of all input records; ORANGE - Union with select that returns the…
-
1
votes2
answers2116
viewsA: Real-time Google Maps Update
Good afternoon, this difference occurs because the site that Voce sent example does not use Google Maps, uses the tool Open Street Map (demonstration, API wiki). I’ve had this problem with the map…
-
5
votes5
answers7434
viewsA: removing part of a string with php
You can do it this way: $url = "https://www.youtube.com/embed/z1n34sRv1-A"; $url = explode("embed/", $url); $embed = $url[1];
-
8
votes7
answers11400
viewsA: How to validate phone in php
I use this function to validate phone: function celular($telefone){ $telefone= trim(str_replace('/', '', str_replace(' ', '', str_replace('-', '', str_replace(')', '', str_replace('(', '',…
-
2
votes1
answer1152
viewsA: PHP - Check that the session (login) is active
I needed to do this in a system that I developed, in case it was not a shopping cart but logic is the same. The first thing you will have to do is create a form of control to know when the user is…
-
1
votes2
answers146
viewsA: Treating Query Many-to-Many
You can implement this logic on your own PHP, change your select so: SELECT jobs.*, f1.file_name, f2.file_name AS nome_foto_capa from jobs LEFT JOIN photos_per_job p ON p.job_id = jobs.id LEFT JOIN…
-
1
votes1
answer412
viewsA: PHP and javascript - Getting javascript value in PHP (use of Session)
The problem is happening because Voce is passing the value in the url as a directory, rewriting the javascript function to: function excluiEvento(val){ var valor = val; location.href =…
-
0
votes2
answers112
viewsA: $key starting with 1
You can crop the array first before entering the foreach. $reg = array_slice($reg, 1); foreach ($dados as $key => $reg) { $table .= '<tr> <td width="3%">' . $key . '</td> <td…
-
0
votes1
answer59
viewsA: Error in UPDATE function
The error is in the query. It has an extra comma before the WHERE, only remove that works. $sql = "UPDATE $this->table SET cargo = :cargo, horastb = :horastb, salario = :salario, WHERE id=:id";…
-
0
votes2
answers1453
viewsA: Count number of people from a table by age group, gender and company
To do this you have to add up the amount of people grouped by company and by gender. Use this query: SELECT COUNT(tb_pessoas.ps_id) AS quantidade, tb_empresas.em_nome, tb_pessoas.ps_sexo FROM…
-
0
votes3
answers90
viewsA: strpos() is closing while true
Your problem is because our friend PHP interprets the "0" in the same way as the "false". So when he finds the substring at the beginning of the string he returns 0 (which php also understands as…
-
2
votes1
answer235
viewsA: city state Jquery error in selection
The problem is occurring because Voce is not returning together with the results of the cities the option Choose the City. This way the first city comes by default as selected but without activating…
-
8
votes1
answer1308
viewsA: What are the design standards for Serviceprovider and Servicecontainer used in Laravel and Symfony?
I developed, at the end of last year (2015), my TCC on a comparison between Frameworks Codeigniter and Laravel 5, and on the use of design standards in their developments. So I studied a lot about…
-
0
votes3
answers44
viewsA: How to order from what has more records to what has less
Our friend your question was a little broad, but I’ve created a select that will help you. Thinking of a structure you would have two tables products (id_product, name, description, etc) previewed…
-
0
votes1
answer231
viewsQ: Remove link from wordpress FORMCRAFT
We have developed a system for vehicle protection association and a Landing page for it (Sistemavalor.com.br). We use Wordpress to develop the Landing page and to develop contact forms we use the…
-
-1
votes2
answers206
viewsA: Select does not work when clicking button
You are doing the wrong select. To use the Like do this way: $query = $db->prepare("select from crudpdo2 where nt_pdo LIKE ':search' ORDER BY id_pdo"); $query->bindValue(':search',…
-
0
votes1
answer123
viewsA: Select with <ul> element
Good night. Try this javascript code here. $(".search_category li a").click(function(){ alert($(this).attr('id')); })
-
-1
votes2
answers339
viewsA: PHP - Problem with search return INNER JOIN with GROUP BY!
You have to make a select from the outside by grouping by user and a select from the inside by sorting. This way: SELECT * FROM (SELECT u.id AS idUsers, u.foto, u.username, u.nome_us,…
-
0
votes2
answers658
viewsA: Order consultation in the interim
It may be necessary some adjustment, but with this logic you can solve the problem. It is not a sort with mysql but it will work. So you make two queries, one for masc and one for Femi, and…
-
2
votes3
answers27676
viewsA: Differences between Onkeyup, Onkeydown and Onkeypress?
Keypress, Keydown and Keyup are events triggered by the keyboard. The Keydown happens first (when the key is lowering). The Keypress happens second (when the text is typed). The Keyup happens after…
javascriptanswered Euler01 1,195 -
5
votes1
answer1133
viewsA: PHP - Banking conciliation
The Banco do Brasil will make available to you every day a return file with the low of the slips made the day before (the oldest times), through internet banking. The return file is a normal text…
-
2
votes1
answer446
viewsA: Taking data from the checkbox and sending it to the bank
If you change the checkbox name to Description[], this way: {!! Form::checkbox('descricao[]',$categoria->id_categoria) !!} In your controller, you will receive an array with only the selected…
-
2
votes2
answers159
views -
2
votes1
answer1219
viewsA: Update on Laravel 5 a field receiving the value of another field from the same table
I managed to solve the problem. For those with the same problem just put the name of the field in the expression DB::raw('column name') in this way: $this->update(['texto' =>…
-
3
votes1
answer1219
viewsQ: Update on Laravel 5 a field receiving the value of another field from the same table
I have a configuration table in my database that has the following fields: ["id", "texto", "textoOriginal"]. Initially the field values texto are equal to the field textoOriginal, but the user can…
-
1
votes3
answers381
viewsA: Use query within the value of another query
You don’t even need to put the word Values, just keep the values inside the select. So: insert into X (a, b) (select "16", c from Y where d = e)
-
0
votes3
answers121
viewsA: Select union rest between tables
Try with the LEFT JOIN, thus: SELECT * FROM cliente LEFT JOIN vendas ON (vendas.id_cliente = cliente.id) WHERE vendas.id_cliente IS NULL
-
6
votes1
answer59
viewsA: Where pelo select
Try using the HAVING result = 1 in this way: SELECT DATE(m.data_marcacao) AS data, nome_operacao operacao, f.cracha_funcionario, MAX(IF(id_tipo_marcacao_est = 4, @i:=TIME(data_marcacao), NULL))…
-
1
votes1
answer67
viewsA: Comment for each post id without multiplication of the same
// VARIAVEL DE CONTROLE PARA TROCA DE QUESTÃO. $idControle = 0; while($row = $result->fetch_assoc()) { // A QUESTÃO ATUAL É DIFERENTE DA QUESTÃO ANTERIOR? SE FOR IMPRIME CABEÇALHO. if($idControle…
-
1
votes2
answers693
viewsA: CSS content property generating an image
What he’s actually using is a library of sources. See for example these other libraries: fortawesome Bootstrap Ionicons…
-
2
votes1
answer72
viewsA: Concatenation Create Table
Rewrite create by adding English quotes ` between the table name. You can do so: $create = mysql_query("CREATE TABLE `userpics_".$email."`( `id_user` VARCHAR(60), `id_pic` VARCHAR(200), `id_tipo`…
-
1
votes1
answer5886
viewsA: How to delete records from multiple tables at the same time?
You have to specify which tables you want to delete from, you just entered the relationship tables. Try to put the tables between the DELETE and the FROM, thus: mysql_query("DELETE Inscricao.*,…
-
1
votes2
answers811
viewsA: Problem with jQuery Validation Plugin
Face I use this function, it has 3 methods, one to validate only CPF other only for CNPJ and another called document that validates both according to the amount of characters in the field. It…
-
4
votes3
answers801
viewsA: How to change a <a> link according to a <select>?
Dude I made some changes to your Fiddle to run a look there. I found it a little confusing because you were already using the value of combo options to control value writing, so I had to create an…
-
1
votes0
answers91
viewsQ: Integrating XAJAX library with Codeigniter
Good evening, today I program with the library XAJAX on all my systems, but I program in pure php without frameworks. From time to time I started to study the framework Codeigniter and I am…
-
6
votes2
answers2318
viewsA: How to make a mysql query from an array coming from html?
Try it this way, buddy if(isset($_POST)){ $cores = implode(",", $_POST['cor']); $carros = mysql_query("SELECT * FROM carros WHERE cor IN(".$cores.")"); }
-
4
votes4
answers4957
viewsA: Javascript code does not work
Good night. There are some things to be corrected in your code. 1º -The js function is wrong parseint is running on the object and value and this missing close the last key. function…
javascriptanswered Euler01 1,195 -
1
votes3
answers127
viewsA: jQuery, do not select 'Child' from the element
instead of using. $('#overlayFancy').children('img').remove(); use $('#overlayFancy').html(''); or else $('#overlayFancy').find('img').remove();…
-
1
votes1
answer974
viewsA: How to call the modal window with parameter in bootstrap?
You cannot pass as parameter no. What you can do is create an Hidden input inside the modal to play the data you need.
-
5
votes2
answers4079
viewsA: Picking up content from div with equal classes
when u put $(Document). ready does not work because the javascript functions should stay out of it. I made some changes in javascript, take a look and see if you understand. I removed the…