Questions tagged as 'mysql'

3
answers

Undefined index: user error while submitting a POST form

Html <html> <body> <form action="encomenda_apagar.php" method="POST"> <br><br> <label class="sr-only" for="inputHelpBlock"></label> <b>INSIRA O SEU USERNAME:</b> <br><br> &l...
asked by 15.06.2015 / 01:05
3
answers

Exception in sql query

How do I display items from my MySql database in php, so that I select all items except one item. Ex: I have several registrations ... item 1 | id01 item 2 | id02 item 3 | id03 item 4 | id04 item 5 | id05 item 6 | id06...
asked by 29.06.2015 / 17:10
3
answers

Calculate percentage between two dates MYSQL

Good morning! I wanted to calculate the percentage of how many times a rating appears between two dates, the ratings are distributed in "red," "yellow," and "green." This is the "questionnaire" table: Itrieditasfollows:$percentagem_ver...
asked by 27.06.2018 / 13:57
1
answer

How to close all active connections?

I have 8 connections open in the database and would like to close all of them, is it possible? What is the MySQL command that does this?     
asked by 04.09.2015 / 22:04
2
answers

Invert id string into a table

I had to migrate a site that was made in pure PHP to Wordpress, searched the internet and managed to copy the data from the old site table to the Wordpress structure, that one thing happened, all the news was copied from behind to front, then wh...
asked by 04.05.2018 / 02:08
1
answer

Says that it writes to mysql but does not save to the database

Form: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="te...
asked by 04.05.2018 / 16:00
2
answers

PHP How do I multiply hours with how many times it will be repeated?

I have a table in my MySQL of products with time, example: Processes table    id - descrision - Time       01 - Piercing - 0:01:50 Example if I have to make a part that has 5 holes, I have to multiply quantity by time. echo $tem...
asked by 21.03.2018 / 18:39
1
answer

Direct sum by SQL query

I would like to know if I have a simple sum directly through the query, I have a table that contains a sub-table named VIEWS and I would like every query that I executed these VIEWS to increase +1 without having to exercise much PHP, how can I d...
asked by 05.06.2014 / 04:36
2
answers

Set of WHERE, AND, and OR Conditions in SQL does not produce the expected result

I'm trying to get some records with a very simple syntax, but it's not working. I'm doing something wrong and I'm not realizing it. Can someone lend a hand? I need to fetch all 2017 records except FREIGHT AND TAXES! I have this: SELECT * F...
asked by 30.06.2017 / 18:11
2
answers

Add the total value of two columns, subtract, and return even if it is negative MySQL

I have this following query: SELECT FORMAT(SUM(receitas_dia) - SUM(despesas_dia),2,'de_DE') AS saldo_efetivo FROM (SELECT SUM(r.valor_receita) AS receitas_dia, (SELECT SUM(d.valor_despesa) FROM despesas AS d WHERE d.pago =...
asked by 24.06.2017 / 15:34