Posts by Walmir Silva • 150 points
7 posts
-
0
votes2
answers70
viewsA: Insert php field concatenating date
To do directly in Mysql, you can do so. For example, I created a simple table, containing only ID (auto_increment) and CODIGO (to concatenate). INSERT looked like this: INSERT INTO tb_teste (codigo)…
-
0
votes1
answer89
viewsA: htaccess replace "_" with "-"
htaccess will not change your direct URL in the browser, it will remain the same. Internally it will convert the characters according to your criteria. For example: <IfModule mod_rewrite.c>…
-
2
votes3
answers2649
viewsA: SQL to search the entire database
I made an example... I created 3 totally different tables and put in each one 1 content in common (my name, Walmir). See the data I entered for example: To perform the query in these 3 different…
-
3
votes3
answers77
viewsA: How do I link three tables?
try so, see if it meets what you want: Select p.id, p.nome, sum(coalesce(e1.quantidade,0)+coalesce(e2.quantidade,0)) as Quantidade from cadastro_produtos p left outer join estoque1 e1 on e1.c_prod =…
sqlanswered Walmir Silva 150 -
1
votes1
answer116
viewsA: convert decimal and date to LOAD DATA INFILE
Try it like this, see if you can fix it: mysql_query("LOAD DATA LOCAL INFILE 'C:/wamp/www/transbordo-sap/estoque/Estoque.csv' INTO TABLE deposito FIELDS TERMINATED BY ';' OPTIONALLY ENCLOSED BY '\"'…
-
1
votes1
answer77
viewsA: Htaccess - Site Friendly URL at the Root
Try this way, please see if it resolves: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$…
-
1
votes2
answers161
viewsA: Different queries but return values in the same table
Try to put the 1st Quarter Average Calculation in just a select: SELECT Product , SUM(Amount) AS 'Total 2017', CAST(SUM(case when MONTH(RegistrationDate) BETWEEN 1 AND 3 then Amount else 0 end)/3 as…
phpanswered Walmir Silva 150