Questions tagged as 'mysql'

1
answer

What's wrong with this Trigger? of MySQL

I GIVE ME ERROR of Sintexis, I'm doing it the same as I think it's done with SQL server 2008 R2 but I do it for MySQL. What is the error? If someone helps me, I thank you in advance. CREATE TRIGGER Actualize_Nombres AFTER INSERT ON sr_escalas_...
asked by 23.10.2018 / 00:40
1
answer

Stored procedures (visual basic.net) and Mysql

CLASS CONNECTION Imports MySql.Data.MySqlClient Public Class Conexion Protected cnn As New MySqlConnection Public idusuario As Integer Protected Function conectado() Try cnn = New MySqlConnection("Server=localhost; Uid=root; D...
asked by 22.11.2018 / 14:46
1
answer

Trigger Remove after 24 hrs

This is the way to perform a trigger that removes data from my database that is less than 24 hours. I have the following table of reservations and in this I add a field 'Type' that can be permanent or by hours, if it is by hours it will be el...
asked by 07.11.2018 / 18:40
1
answer

In a select option, another data appears

Hello good afternoon friends I would like that in a select option it could be shown next to the cedula and the name two data in an option for the moment I have this code $html .= "<option value='".$row['cedula']."'>".$row['cedula']."<...
asked by 26.09.2018 / 23:38
1
answer

Error # 1452 when trying to relate two tables

I try to relate two tables (users and comments), the primary user key is idUsuario, and the foreign key of the comments table is userid.    I have also specified the two tables as InnoDB.    And in the next image the primary and for...
asked by 02.10.2018 / 11:43
1
answer

REMAIN TIME AND SHOW TOTAL - MYSQL and PHP

I have the following question and you can not help me. I have this table in the BD, it is a record of assistances that keeps the time of entry to work, time of entry to lunch, lunch, work output. In the table there is stored data in...
asked by 29.09.2018 / 20:03
1
answer

How can I make a query that I add and subtract in a table

<?php $db = mysqli_connect("localhost", "root", "", "paypal"); /* verificar la conexión */ if (mysqli_connect_errno()) { die("Conexión fallida:" . mysqli_connect_error()); } $sq = "INSERT INTO montos (usuario, monto...
asked by 05.10.2018 / 16:42
2
answers

get data from 2 tables

I have an invoice table with the fields number, date and a table details with the fields numerofactura have their foreign key and the whole thing. I WANT TO OBTAIN ALL THE DETAILS OF THE INVOICES IN A RANGE OF DATES AND I AM SENDING YOU THIS QUE...
asked by 24.09.2018 / 20:52
1
answer

is it possible to create a document database in MySQL?

Inside MySQL 5.7 onwards until version 8; we are already able to use attributes for data of type JSON Like this: CREATE TABLE profile( id BIGINT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(50) UNIQUE NOT NULL, attributes JSON NOT...
asked by 23.09.2018 / 22:12
1
answer

Problems connecting Mysql with VB.NET

I'm trying to connect a Mysql database with .NET and download the connector for this page Link where you download the connector and this is the code that I use in .NET Imports MySql.Data.MySqlClient Public Class conexion Private MysqlComm...
asked by 04.10.2018 / 22:28