Posts by Raphael Godoi • 549 points
21 posts
-
0
votes1
answer82
viewsA: Count a pl/sql column
The result of your query does not match with the example query. In the query there is no service field, but in the result yes, anyway I understand that what you need is a query similar to the query…
-
0
votes1
answer57
viewsA: I need to present the product with the highest gross sales
In my view there is an error in your modeling, consider reviewing, because you do not record the value of the product in the sales table, imagine the following scenario: In your product list the…
-
0
votes1
answer41
viewsA: Sum of Count’s from different columns
The answer is as follows: Unify the value of all tens, but instead of UNION use UNION ALL, because UNION when there are repetitions considers only once the value, remember the lessons of set theory…
-
0
votes1
answer32
viewsA: Return the period where you have the highest number of records in a table
You can do what you want in the following way: Group the months and count the number of records; Sort the total quantity in descending order (largest to smallest); Limits the result; select…
-
-2
votes1
answer42
viewsA: Different performance using limit less than 100 and greater than 100
I didn’t understand why use the case in this context, find_in_set(status,'Ok') instead of status like '%Ok%', changing the query as below improves performance? select consultas.id from consultas…
-
0
votes2
answers157
viewsA: Mysql message: #1241 - Operand should contain 1 column(s) - Copy data from different tables and databases
Considering that the extra field in table B, it is not mandatory the code to do what you need will conform below, as you only want to include accountid as long as it does not exist in the table…
-
1
votes1
answer25
viewsA: Webservice returning error
Come on You have declared a variable called $password, but when you are instantiating the PDO is using a variable called $pass, replace $pass with $password Also adjust the quotation marks, follow…
-
12
votes3
answers6310
viewsA: Problem with brmask in Ionic 4?
Follow the steps below carefully to solve your problem: Remove the packages you have installed so far for formatting, so use the npm name-package command; Done this install the following package:…
-
1
votes2
answers343
viewsQ: Doubt about autoload using Poser
I created a very simple example of using autoload using Composer and PSR-7, but I would like to understand a question, below what I did: Inside my composer.json, added the following: "autoload" : {…
-
0
votes2
answers247
viewsA: How to force string interpolation when one comes from the database?
I would like to thank you very much for the help, I ended up using str_replace, I thought it was better, follow how it was my method, I’m using Laravel. public function EnviarSMSInadimplentes() {…
phpanswered Raphael Godoi 549 -
3
votes2
answers247
viewsQ: How to force string interpolation when one comes from the database?
Assuming I have the variable: $nome = "John Due"; When I do: $mensagem = "Seja bem-vindo, {$nome}"; I will have the result "Welcome, John Due", because I defined my string with interpolation…
phpasked Raphael Godoi 549 -
1
votes3
answers112
viewsA: Prevent user from registering 3 times in the same week
I think it is very quiet to solve your problem, first based on the day the person is making the booking you will need to know which is the first and last day of the current week, so use the code…
-
2
votes0
answers348
viewsQ: How to integrate Eclipse PDT with Laravel 5
I wonder if anyone knows how to actually integrate Eclipse PDT IDE, with Laravel 5.x... Do I need a plugin? Do you have a step-by-step pass? I opened an existing project, however Eclipse is…
-
1
votes1
answer254
viewsA: Is it possible to filter through a calculated column?
From what I understand that’s what you need: SELECT * FROM ( SELECT TOP 5 A.APELIDO, A.REALIZADO, A.META, CAST((A.REALIZADO/A.META)*100 AS DECIMAL(10)) AS ACUMULADO, DENSE_RANK() OVER (ORDER BY…
-
1
votes1
answer952
viewsA: Find Relationship between Oracle Tables
I believe we already have the solution to your problem right here in the stack overflow take a look: List of Foreign Keys and the Tables they Reference…
-
1
votes1
answer1277
viewsA: Error running Procedure on oracle
I may be wrong but what you need is a function and not a precedent, see if the function below meets your need, if you still want to return a value using Precedent, you will have to declare a…
-
1
votes2
answers6537
viewsA: Remove Oracle Special Characters
Based on your need, I designed a function, and added the possibility for you to define which character you want to remove from the beginning and end of the string, I hope it helps you: CREATE OR…
-
3
votes1
answer598
viewsA: AUTO_INCREMENT Mysql problem
First of all you should check if there is any problem in your insertion, using an exception block, when you try to insert something and some error occurs, even so the sequence changes, it is…
-
1
votes1
answer68
viewsA: Average SQL Cost
select max(custoun) as maior_custo_unitario, avg(custoun) as custo_unitario_medio, min(custoun) as menor_custo_unitario, count(codprod) as…
sqlanswered Raphael Godoi 549 -
-2
votes1
answer351
viewsA: Cannot add Foreign key Constraint
Every client is a person (Can be Physical or Legal); Every person has a type (Physical or Legal); I created a modelling similar to yours but with some adjustments: Below the script for creating…
mysqlanswered Raphael Godoi 549 -
2
votes1
answer1231
viewsA: innerHTML on a TR of a Javascript table
I created something fast and described each step as best as possible for you to understand, in my example I used a form... I did with pure javascript as well as your code, but I advise you to use…