Posts by Filipe Damasceno • 139 points
13 posts
-
1
votes1
answer77
viewsA: ERROR WHILE UPLOADING Laravel
Change the first part: $extension = $request->file('foto')->getClientOriginalExtension(); $name = uniqid(); //salva um nome baseado no id $nameFile = $name.'.'.$extension; $path =…
-
0
votes1
answer127
viewsA: Code with if and Else does not work
Hello there is a simple error in your code: scanf("%d", &i); You need "&" to reference the memory address of the variable "i". & Only not required when working with pointer. I hope I…
-
1
votes2
answers33
viewsA: Error executing and showing deletion of an id in the database using PHP
Analyzing your code: $remove = "DELETE FROM cliente WHERE id_cliente = '%$codrem%'"; That part seems to be the problem: '%$codrem%' if that $codrem is a variable with the id the correct would be:…
-
2
votes2
answers173
viewsA: Can I use the dd() function in production?
@Kênia in production generally APP_ENV=Production and APP_DEBUG=false so both exceptions and the use of dd are diverted to the log Storage logs Laravel.log, because when using dd the interruption…
-
1
votes2
answers227
viewsA: How to save variable and use after page refresh
php is stateless, so each request is independent, not related to the previous one, because the attribute status is not maintained. Therefore Voce can store in the session as follows: <?php //…
phpanswered Filipe Damasceno 139 -
2
votes3
answers134
viewsA: How to open only one form even by multiple clicking C#
Basically you would have to check if the form is already open: if (Application.OpenForms.OfType<Form2>().Count() > 0) { MessageBox.Show("O Form2 já está aberto!"); } else { Form2 form = new…
-
0
votes2
answers70
viewsA: How to return a data message that does not meet a condition in a repeat loop?
The best way would be to create a search function that returns true or false: boolean busca(TIPO_AQUI temp1,TIPO_AQUI temp) { for (cont=0; cont<=6;cont++) if (strcmp(temp1,temp[cont])==0) return…
-
0
votes1
answer80
viewsA: Is it possible to connect PHP to an old version of mysql server (3.23)?
The problem is that you are using a drive that has no support for the version of mysql you want to connect: Possible causes: When we use a xampp, wamp server .... Already comes along the drivers,…
-
1
votes2
answers103
viewsA: How to search multiple data in mysql without losing performance
To improve performance I suggest the following: Indexes the fields used in the WHERE enclosure It is preferable to take everything using junction or subconsulta and treat programmatically, because…
-
2
votes1
answer26
viewsA: How to Get Data from an N Relationship for N
You can build the query in several ways, because the JOINS between tables has N possibilities. But one of the forms would be: SELECT pc.*,pro.desproduct,cat.descategory from tb_produtos as pro INNER…
-
0
votes1
answer149
viewsA: Send Hash in the e-mail and confirm in the form
Opa friend, as your doubt is very comprehensive I believe you want to just a way to go, so here are some tips: When registering students and schools, a hash should be generated, logically this hash…
-
-1
votes1
answer167
viewsA: Problem with Laravel API in production
It would be interesting put the code of the method of its controller, because depending on the conditions used it can pass the method without performing any operation, until it arrives in Return, so…
-
1
votes1
answer141
viewsA: Create Groups and Group Items Within Them
You can play the result in a collecion, then use the groupBy function(). $collection = collect([ ['account_id' => 'account-x10', 'product' => 'Chair'], ['account_id' => 'account-x10',…