Questions tagged as 'mysql'

1
answer

Problem inserting data with MySQLi

I have this database created in phpMyAdmin: The problem I have is that when I insert the data of the form where I create a user manages to connect to the database, the data sends them but does not save them, concluding with the redirect...
asked by 26.12.2015 / 07:20
3
answers

How to verify that the user that I intend to register already exists?

Here is the save process: $nuevoobjeto= new Objeto(); $cedula = $_POST['cedula']; $nombres = $_POST['nombres']; $apellidos = $_POST['apellidos']; $telefono = $_POST['telefono']; $telefono1 = $_POST['telefono1']; $telefono2 = $_POST['telefono2...
asked by 10.04.2018 / 16:37
3
answers

How to select several records with Checkbox?

I'm doing a facturer, and when it came to billing several products, it occurred to me to use checkboxs since I still have not gotten with JS , so is the code of the checkboxs : <?php require_once ("ModeloProductos.php");...
asked by 29.03.2018 / 04:57
1
answer

Modify user

I have a database with 2 tables. A call sec_users with the following fields: pk_user login pswd Another table called solicitud with the following fields: pk_solicitud fk_usuario fe...
asked by 02.04.2018 / 11:10
2
answers

How to return a record that contains several values separated by comma

I have this table in the database: Tabla de Ejemplo: id - registro - valor 1 - compras - 1,2,6 2 - ventas - 3,4 3 - deudas - 5 I want to make a query where I send only the number 3 and bring me the record 2 in this exampl...
asked by 18.08.2016 / 22:31
3
answers

There is the Insert Update in MySQL

I would like to know if there is an Insert Update instruction in MySQL, something that would know that if that record already exists in my table, update it and create a new one, and if so, how is it handled?     
asked by 19.10.2016 / 18:54
3
answers

How to know if I am in the last iteration of a foreach

I have a function that concatenates a query from POST variables, this I do with a foreach: $id = $_POST['empId']; $query = "UPDATE userInfo SET "; foreach ($_POST as $key => $value) { $query .= "$key = '$value', "; } $query .= " WHERE i...
asked by 15.05.2018 / 21:30
2
answers

Doubt about saving an image in database

I have a question about saving an image in a database, in specific mysql, my question is what would occupy more space in the server, save the bytes of the image in a field of type bytes or save the image in a specific directory and then t...
asked by 22.08.2016 / 23:33
3
answers

Special PHP characters

Good morning, today I come with a small problem that is this echo $consulta; to which he replies with: SELECT SUM(carrito_cant) as cantidad FROM carrito_tb WHERE carrito_folio='3041M�Ra' and carrito_NP='NA'; Devido to the character or...
asked by 10.02.2016 / 00:27
4
answers

Concatenate two fields

I am concatenating two fields but it is showing me the end of one capo with the other. example: Pedro PabloCastro Ruíz SELECT documento, concat(nombres, '', apellidos) as datos, nacimiento FROM jugador     
asked by 12.07.2017 / 17:20