Questions tagged as 'mysql'

1
answer

Problems with a procedure that grants permissions in a BD in MySQL

I am doing a procedure stored in MySQL that allows me to give certain permissions to the user that receives in the parameters, however, it does not assign them to the user that sent it by parameters when calling it, but, it creates a user with t...
asked by 18.09.2018 / 19:58
0
answers

How to implement a confirmation before executing an UPDATE

I have the following code: //APROBAR PAGOS MENSUALIDAD function aprobar_pago_mes() { global $db; $idusuario = ($_GET['id']); $sql = "UPDATE pagos SET status_pago = 'APROBADO' WHERE id = '$idusuario'";...
asked by 18.09.2018 / 19:36
0
answers

PHP- Trying to get property of non-object

I'm trying to do a query on mysql in php, but I get an error on line 131, which is: $num = $res->num_rows; The error is:    Trying to get property of non-object. I know that the error comes from the query but I can not find it. Co...
asked by 18.09.2018 / 10:02
0
answers

MySQL - trigger to generate an md5 code

I have been trying to use a trigger to update a record after I entered it, the problem is that the following code does not work for me: CREATE TRIGGER 'test_trigger' AFTER INSERT ON 'chat_test_trigger' FOR EACH ROW UPDATE chat_test_trigger SE...
asked by 03.10.2018 / 15:43
1
answer

How can I import a dump file (database) from mysql to sql server 2014?

I have some dump files from mysql and I need to import them to Sql server 2014, does anyone know how I can do it? Thanks in advance     
asked by 18.09.2018 / 12:02
0
answers

Pass id value of a button to a mysqli php modal

I'm trying to pass a value from a button to an editing modal, the development I'm doing in php and mysqli the outputs are giving me a perfect way and the idea is not to leave the same page. to make modifications of the users, but I have found th...
asked by 16.09.2018 / 15:29
0
answers

Create Query SQL - Hibernate Java EE

I have a small concern and I hope that the most experienced can help me. I'm doing a web project with the Framework Hibernate , it turns out that I have it connected to a MySQL database in XAMPP, all right, I created a login so that users c...
asked by 15.09.2018 / 23:24
1
answer

Code error: 42000. MYSQL

Good day I'm installing a laravel script on a vps and use a remote database, when I run the migration it throws me the error Code error: 42000. SQLSTATE[42000]: Syntax error or access violation: 1227 Access denied; you need (at least one of)...
asked by 15.09.2018 / 23:47
0
answers

How can I write a file to create and write a .txt file with the records of a table of a bd with php?

Actually I know how to write a .txt file with php but only sending data from a form, what I'm looking for is to write the file according to the records found in the table of the bd ...     
asked by 18.09.2018 / 17:45
0
answers

how can I set a distinct to the result of a select that contains another distinct?

This query gives me repeated data, and I want to give a distinct to the result of it. help me please, thanks in advance. SELECT DISTINCT c.*, IF (c.code = 'FF', "INICIO" , "-") AS PARTIDA, IF(re.code_enlace = 'FF', CONCAT("INVITADO DE ",...
asked by 21.09.2018 / 22:38