I'm trying to update a record in the database and I get this error:
<h1>A Database Error Occurred</h1>
<p>Error Number: 1062</p>
<p>Duplicate entry '1' for key 'PRIMARY'</p>
<p>UPDATE 'compra'...
I have a query that makes the MariaDB server occupy 100% CPU for more than 10 minutes and finally the page gives timeout.
The query in question is the following:
SELECT
formasdepago.nombre as 'Forma de pago',
SUM(transaccion) AS Total...
I would like to create a matrix with two tables in sql in the following way:
I have a table that contains the data:
id | name
00 | Form 0
01 | Form 1
02 | Form 2
03 | Form 3
04 | Form 4
another table:
id | name
00 | person...
I would like to know how to get the input values of a form.
I show the current values extracted from the database by means of an echo and the intention is to be able to change them.
The code (editproyectos.php) would be:
<table class...
I have to return in a table in HTML, the name of the user and the
names of posts; however, I have registered more than one post
user; for which I require to use group_concat() for
put them in a single cell; I'm trying it this way...
From Android Studio I make the following query against a MySQL database
SELECT id_ave,
Date_format(fch_ave, '%d/%m/%Y') AS 'fecha',
zon_ave,
cli_ave,
per_ave,
tip_ave,
Ifnull(nom_tip_ave, 'Sin tipo')...
I need to insert multiple records in a mysql table, from another table, but only the first record in the table is inserted
my code is as follows
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
echo "Conectado a la ba...
I make this query:
SELECT idFormacion FROM alumnos_formacion
And I get this:
|idFormacion|
-------------
6
9
12
My question is whether a query can be made to put each row obtained in independent columns.
|idFormacio...
I do not know what title to put to ask this question so all help to get this question resolved is welcome.
Given the following tables:
The result I want to get is the depto_no of the department with the most employees, that is:...