Questions tagged as 'mysql'

2
answers

Error connecting mysql base with java

I use the following code to connect to mysql public static void main(String[] args) { MapeadorServicio aux = new MapeadorServicio(); Auto aux1 = new Auto(0); Persistencia p = Persistencia.getInstancia(); p.guardar(aux); } public...
asked by 27.12.2017 / 23:24
1
answer

Query in MySQL

Good afternoon, I have a database your name is socialdb. I have the following tables: users (userid, name, email, password). friends (friend_id, send_user, received_user, status) posts (pub_id, id_user, comment, avatar, creativ...
asked by 15.12.2017 / 18:06
1
answer

Average of each MySQL car

I have the following table in MySQL create table alquilan ( matricula varchar(20) not null, id_usuario numeric not null, n_tarjeta varchar(50) not null, codigo_seguridad varchar(10) not null, precio numeric not null, ch...
asked by 22.12.2017 / 18:33
1
answer

Adding time in MySQL

I'm trying to add a certain time to another. For example: I have the time: 23:00:00 (11) and I want to add 2 hours (that of 01:00:00) but I do not achieve it. I tried ADDTIME ("23:00:00", "02:00:00") but this returns me 25? How could you s...
asked by 08.12.2017 / 23:06
3
answers

Paginate a mysql table with DataTable

I have a table that brings mysql data in PHP, and I have the DataTable Scripts, but it does not page the table. What should I do to get the table, Thanks in advance. <table> <head> <meta charset="utf-8"/> <meta htt...
asked by 26.01.2018 / 15:08
1
answer

PHP Create Api Rest with drivers in Slim3

I am learning the Slim3 framework to create apis rest / full, I found several examples, for example in routes.php $app->group('/v1', function () { $this->group('/auth', function () { $this->map(['GET', 'POST'], '/login', '...
asked by 06.12.2017 / 11:27
2
answers

Get dates with mysql

I have a problem, I want to recover dynamically what happened seven days ago, and then what happened six, five and so on until 1 day ago. The problem is that when I do between the date accumulates the data, it does not bring me what happened exa...
asked by 06.12.2017 / 01:55
1
answer

PHP mysqli_query () It does not work

I am learning to connect MySQLi PHP with MySQL, I made this CRUD but it does not work correctly. Only works in table Alumno , but not in table Matricula . I already tried with mysqli_multi_query() and with different...
asked by 25.11.2017 / 00:20
1
answer

MySQL - Help creating a DELETE stored procedure

I am learning to use MySQL and I need help creating a PA to erase fields of 2 tables at a time, this is what I tried and it did not work CREATE PROCEDURE BorradoCascada BEGIN DECLARE @IDalumno INT(); delete FROM alumno where IDalumno = @ID...
asked by 26.11.2017 / 18:23
1
answer

Mysql Complex Consultation

I want to show in a table how many people belong to a department and their department head, if there are no people, it will show 0, and if there is no department head assigned, any value ("there is not", 0, I do not care) In this selection I...
asked by 02.12.2017 / 22:24