Posts by Andrews Gomes • 458 points
24 posts
-
1
votes0
answers146
viewsQ: Error Code: 1093 You can’t specify target table’d' for update in FROM clause
I’m trying to delete the record from the table but returns me this error message, what I’m doing wrong ? I tested in various ways and I always fall in this message Error Code: 1093 You can’t specify…
mysqlasked Andrews Gomes 458 -
0
votes0
answers196
viewsQ: Redirect to another component by passing ID via table button in React
I have a process component that should redirect me to another component, this other component will need to receive the process.ID, in order to render the records referring to the process. I created…
-
0
votes1
answer25
viewsA: Problem with Order By Case Over 9 When
It worked using this way, I used two characters and put quotes ORDER BY CASE descricao WHEN 'Rec. Op. Liquida' THEN '01' WHEN 'VENDA MERCADORIA' THEN '02' WHEN 'ICMS S.T S/ VENDA' THEN '03' WHEN…
-
0
votes1
answer25
viewsQ: Problem with Order By Case Over 9 When
How to correctly use ORDER BY CASE WHEN with more than 9 records ? In the example below I am using a case when with more than 9 records and when it arrives at position 10 , 11 ,12 e 13 the order is…
-
4
votes2
answers116
viewsA: How to take all the <td> textContent of a table and assign it to an array?
You can use another foreach to pick up each element and manipulate it the way you want. liberarClickTr(); function liberarClickTr() { document.querySelectorAll(".tr-row").forEach(e => {…
javascriptanswered Andrews Gomes 458 -
0
votes1
answer40
viewsQ: Get 12 months of table date for group by and continue taking data from another table with variable date using LEFT JOIN
My table 'a', has a certain number of dates, from January to December. My table 'b', is a calendar table from 2014 to 2100. My goal is to give a group by from January to December, however in my…
mysqlasked Andrews Gomes 458 -
1
votes1
answer51
viewsQ: Fill in the name even if the name does not exist in the table
How can I replace the section below, so that the name of the activities of tbl_atividades_por_dep, even if the record does not exist in the tbl_atividades, the first select with distinct is what…
-
2
votes0
answers55
viewsQ: PHP error with PDO and SQLITE, Call to a Member Function execute() on bool
Hello, can anyone see why this error is apparently all right function verificarImportados(){ define("DB_DSN", "sqlite:host=localhost;dbname=dbXML.db"); define("DB_USERNAME", " ");…
-
1
votes0
answers47
viewsQ: How to capture PHP errors, functions or methods using Monolog?
Good afternoon, I’m trying to create error checker, for whenever you have any particular PHP error on client side send register a Log. My problem is this, how can I capture PHP errors to upload to…
phpasked Andrews Gomes 458 -
1
votes1
answer270
viewsQ: How to fix the error in PHP - Fatal error: Uncaught Runtimeexception: Curl error (code 77)
I’m trying to parameterize Monolog in PHP and I’m getting an error. I’m trying to interpret this mistake, but I can’t understand what it is occurring, someone knows what could be ?. The mistake…
phpasked Andrews Gomes 458 -
2
votes2
answers193
viewsA: How to make a Select with multiple SUM?
The query is almost right, but lacked a detail to work properly, try this way it will certainly work. SELECT SUM(CASE WHEN STATUS = 'CONCLUIDO' THEN 1 ELSE 0 END) AS Concluido, SUM(CASE WHEN STATUS…
mysqlanswered Andrews Gomes 458 -
9
votes2
answers568
viewsQ: "Alert", "confirm" and "prompt" are considered bad practices?
Where I work some professionals do not like to use these features and said they are considered bad practice and were warned by other more experienced programmed not to use and end up replacing these…
-
1
votes0
answers37
viewsQ: Group a date field in months
Good afternoon, could someone help me? How can I put this query to display from January to December correctly? SELECT EMPRESA,ATIVIDADE,DATA,STATUS FROM tbl_atividades WHERE YEAR(dt_vencimento) =…
-
2
votes1
answer72
viewsQ: How to make a select taking into account if the record exists, if it does not exist return null or empty
I have a code that returns the activities that have been completed within a 12 month period. SELECT empresas, tipo_atividade, CASE WHEN (SUM(CASE WHEN MONTH(dt_vencimento) = 1 THEN 1 ELSE 0 END))…
-
0
votes1
answer36
viewsQ: Incorrect grouping of lines
Hello someone can help me, I’m trying to bring a company report and activity made in 12 months, a company and an activity was made during 12 months and I want to know each activity if it was made in…
-
1
votes1
answer174
viewsQ: add and split results in the same query by taking the result of the first sum
I need two information I make the first sum SELECT FORMAT(ROUND(SUM(CASE WHEN MONTH(periodo) IN (12) AND classificacao = '3.6' THEN IFNULL(debito-credito,NULL) ELSE 0 END)) ,2) AS custo_1, Right…
-
0
votes2
answers34
viewsQ: Select does not return values correctly per month
I have a table with a field where the value is (current balance) and in this table has a column (period), where has the date I want to check, however, when I run the Query below only returns the…
mysqlasked Andrews Gomes 458 -
0
votes1
answer56
viewsQ: Select after select result
I am trying to select in a table to display a list of activities. And second select on each of the first select lines to count how many are in each status, but I’m having syntax error, which I’m…
-
0
votes2
answers72
viewsA: How can I define an element over another element?
You can set the Z-Index The z-index property specifies a stack order of an element. An element with higher stacking order is in front of an element with a smaller looting order <!DOCTYPE html>…
-
1
votes0
answers18
viewsQ: Problem with Charset utf-8
I’m having problems in displaying my text appears wrong, but I put the <meta charset="utf-8"/> Without success, follow as it is. HTML STRUCTURE IS LIKE THIS <!DOCTYPE HTML PUBLIC…
-
1
votes0
answers131
viewsQ: Error trying to restart NGINX in Terminal Service for installing SSL Let’s Encrypt
I’m trying to accomplish this step by step how-to-Secure-Nginx-with-Let-s-Encrypt-on-Ubuntu-16-04 For the purpose of installing a free ssl certificate Let’s Encrypt My problem: I can’t reset the…
nginxasked Andrews Gomes 458 -
1
votes2
answers352
viewsA: Crontab does not run PHP function of the file in the directory
|PROBLEM SOLVED|Logging in as a Root user on Putty via SSH In the terminal I put sudo apt-get install php7-cli After that I entered with sudo crontab -e Inside crontab I called my php file this way.…
-
1
votes2
answers352
viewsQ: Crontab does not run PHP function of the file in the directory
I am running the following code on the Linux Server via Digital Ocean’s Putty Inside the Crontab-e This way 01 00 * * * /var/www/html/atualizador/atualizador-global.php * * * * * /usr/bin/php7.3…
-
1
votes0
answers151
viewsQ: Boostrap with different views in Chrome and Firefox
I have a dynamic list fill code that in firefox correctly displays the fields, but in Chrome is disorganized, as if boostrap is not working. Follow the code below function inserirFormulario(dados) {…