Posts by Diego B. Sousa • 150 points
12 posts
-
1
votes2
answers71
viewsA: Adding fields between different tables in Mysql
Since there is only one field that is common to all tables, id_compra, then you can make a NATURAL JOIN, because it will use this field to do Join. If you do not want to update the entire table at…
mysqlanswered Diego B. Sousa 150 -
0
votes3
answers471
viewsA: Delete last comma from a string
See the following Code snippet that removes the comma with or without space before the square bracket. <?php /*A string que vc forneceu*/ $texto =…
phpanswered Diego B. Sousa 150 -
0
votes2
answers1115
viewsA: URL rewriting with parameter for another site . htaccess
Good afternoon, Müller Nato. I think what you need is the QSA Flag, Query String Append. It does nothing but add the query string, which is the part of the URL that comes after ? including the end…
-
0
votes1
answer220
viewsA: Is it possible to configure a Rewrite Rule in AWS without changing the directories?
I assume you are using Ubuntu and apache2.4, so maybe your virtual host configuration files are stored in /etc/apache2/sites-enabled/teudominio.com.br.conf Edit your . conf file with the data below.…
-
2
votes1
answer211
viewsA: URL rewriting with "+" sign (same as Google+) . htaccess
RewriteEngine on RewriteBase / RewriteRule ^\+(.*)$ /?track=$1 [L] RewriteRule ^(.*)\+(.*)$ /$1?track=$2 [L]
-
2
votes1
answer455
viewsA: INNER JOIN Group Very slow in consultation
SELECT MAX(g.idgps), /*Esta agregação faz parte da mágica*/ g.lat, g.long, g.id_motorista, g.id_saida, a.start, a.hora_start, a.p_nome, …
-
0
votes2
answers319
viewsA: Check with IF and INNER JOIN
Hello, you should post the schema of your database. But come on. Supposing in your database pedidos.mesas and mesas.id are the same kind, so we’d do: SELECT IF( /*Condição, se não for NULL é porque…
-
1
votes4
answers29938
viewsA: Regular expression to accept only numbers and a ","
function soNumeros(numeros) { /*Retorna máscara com R$*/ numeros = numeros.replace(/\D/g, ""); numeros = numeros.replace(/(\d+)(\d{2})/, "R\$ $1,$2"); numeros =…
javascriptanswered Diego B. Sousa 150 -
1
votes1
answer336
viewsA: POST (PHP) with JSON
What may be happening is that you are sending a POST or PUT but without the header of Content-Type: "application/x-www-form-urlencoded", this indicates that it is a POST that the server is…
-
1
votes2
answers880
viewsA: Duplicate value in table. How to remove?
DELETE T2 /*Isto aqui define a tabela que terá o registro apagado*/ FROM candidatos T1 INNER JOIN candidados T2 ON T1.SQ_CANDIDATO = T2.SQ_CANDIDATO AND T1.id < T2.id /*Isto aqui…
-
1
votes1
answer825
viewsA: Download script by Curl method
//Tempo de execução ilimitado, visto que você //baixará arquivos grandes set_time_limit(0); /*Ponteiro do Curl*/ $ch = curl_init(); /*Ponteiro do arquivo que será salvo*/ $fp = fopen($destino, "w");…
-
1
votes2
answers381
viewsA: Trying to make the login work, but shows no error but also does not enter
Modify the parameter enctype of your form: enctype="multipart/form-data" It is he who is causing the error because with this parameter you are saying that you are uploading a file. Do so:…