I have the following tables:
CREATE TABLE 'COMPRAS' (
'codigo' CHAR(10) CHARACTER SET utf8 NOT NULL,
'periodo' SMALLINT(4) NOT NULL DEFAULT '0',
'mes' SMALLINT(2) NOT NULL,
'numero_indicador' INT(12) NOT NULL DEFAUL...
I have a table in which the primary key is in 'BCB001' format, I would like to know if there is any way to format AUTO_INCREMENT so that I can fill in the field I need.
Good, I am trying to insert data in all the tables of my database, especially the one of student that depends on three foreign keys already obtained when executing the previous querys. I will leave all the queries, but I would like them to detai...
I'm trying to implement this code snippet
public List<int> Temperatura()
{
List<int> Datos = null;
string connStr = "server=localhost;user=root;database=sensores;port=3306;password=123456;";...
I have the following query
SELECT matricula_veh as 'Identificacion',
concat(marca_veh,' ',modelo_veh) as 'InfoName',
'Vehiculo' KindData
FROM vehiculos
UNION
SELECT id_per as 'Identificacion',
concat(nom_per,' ',ap...
I have a list of orders, when I click on one I see the detail of that order and I have a button to mark it as DELIVERED. I pass the id of the order from a jsp to a servlet and there I do the update (until here it works well), but after the updat...
I have a simple system to store data in a database through the
following form:
Conexion.php
<?php
$host="localhost";
$usua="root";
$pass="";
$base="yerson"; //base de datos//
$cone = new mysqli($host,$usua,$pass,$base);
if ($cone->co...
I need to know what could be wrong with this query:
INSERT INTO 'turnos_enviados'('rut','hora_envio', 'turnos')
SELECT "12345678", 'hora_envio'+1, "string cualquiera"
FROM 'turnos_enviados' ORDER BY 'hora_envio' ASC LIMIT 1
ON DUPLICATE KEY UP...
In Mysql, as I can give permissions for a user to execute all the procedures, I found:
GRANT EXECUTE ON PROCEDURE miBD.miProcedure TO 'USER'@'localhost';
As you can see you can only give permission to one procedure but not all, how to give...
I come with a problem with PHP and MYSQL.
I tell you: I'm creating as a followers system, and I had it finished and I made it work, but the code was not the best we could say, because ... well, this was the code I had before:
$followers = "SEL...