Posts by Victor Maziero • 41 points
10 posts
-
-2
votes1
answer27
viewsQ: Help with SQL and PHP
Good afternoon, I need a help, I’m beginner in php I have the following code that works and sends the e-mail all right. <?php $host =…
-
0
votes2
answers90
viewsA: sql filter in another table
I managed to solve with this code. select lanc.id_contas, (sum((case when (lanc.id_tipo = 1 OR lanc.id_tipo = 5 or lanc.id_tipo = 4) then lanc.valor else 0 end)) + sum((case when (lanc.id_tipo = 2…
-
0
votes2
answers90
viewsA: sql filter in another table
I managed to do so, select lanc.id_contas, sum(case when (lanc.id_type = 1 OR lanc.id_type = 5) then lanc.value Else 0 end)) AS Revenue, sum(case when (lanc.id_type = 2) then lanc.value Else 0 end))…
-
0
votes2
answers90
viewsQ: sql filter in another table
Good morning, I have a problem where I have the following code working. select (sum((case when (lanc.id_tipo = 1 OR lanc.id_tipo = 5) then lanc.valor else 0 end)) + sum((case when (lanc.id_tipo = 2)…
-
0
votes1
answer18
viewsQ: Import description from another table
Hello guys I have the following code: SELECT COUNT(*) AS categorias_total, v_lctos_despesa.id_categorias FROM 'v_lctos_despesa' INNER JOIN categorias ON (v_lctos_despesa.id_categorias =…
-
0
votes2
answers81
viewsQ: Sum and total sql
Hello I have the following sql: `SELECT sum(value) the exits, (select sum(value) FROM entries WHERE id_type = 1 ) recipes FROM lancamentos WHERE id_type = 2 group by id_tipo ` It’s working ok, I…
sqlasked Victor Maziero 41 -
0
votes1
answer32
viewsQ: Sort name of php file
I have a php code, which I use to make files available to clients, but I need it to sort the file name from the largest to the smallest, for example, I have the files: 2019 Arquivo 1 2018 Arquivo 2…
-
0
votes1
answer109
viewsQ: Block files so only logged in users have access
I have a folder structure mounted as follows: System - data - css - Connections (database) - images In the data folder I make the files available for authenticated users to download. However, if I…
-
2
votes2
answers485
viewsA: How to list only PDF documents in PHP?
I managed to solve with the following code: <?php foreach (glob("*.pdf") as $arquivo) { echo "<a href='$arquivo'>$arquivo</a><br>" ; } ?>…
-
-2
votes2
answers485
viewsQ: How to list only PDF documents in PHP?
I have a code that is listing the files within a certain folder, and linking to download, working all right. However, I would need this code to list only files with the format *.pdf, the code is…