Questions tagged as 'insert'

0
answers

Error when inserting a Postgresql record

I have my created function which receives parameters and I want to insert them in my product table but I get an error CREATE OR REPLACE FUNCTION insertarProducto(_codigo character,_descripcion CHARACTER VARYING,_precio MONEY,_stock INTEGER,_fe...
asked by 29.05.2018 / 21:44
1
answer

Send a url to a database

Image of the table images: link Hi, I was doing a drawing game made with canvas and I have a "Upload" button with which I would like to upload the url of the image to the bd. I have a function with which I can create a canvas url: func...
asked by 16.05.2018 / 16:08
0
answers

Make one column depend on another

I need that when inserting a row, one data is updated in function of another. In this case I intend that number2 be updated to be the same as number1, but the trigger does not work CREATE FUNCTION igual() RETURNS trigger AS ' BEGIN new.numer...
asked by 18.05.2018 / 19:49
0
answers

PDO - Insert does not save the data, but I do not have any errors in the php

I have to save some data from a form in a mysql database. In a php file I have a select (combobox) that is filled with values from tables in the database. I think I have the insert code well, but for some reason it does not save anything....
asked by 19.04.2018 / 18:43
0
answers

Insert information in a MySQL table that contains a foreign key

The invoices table is linked to the provider table by the provider_id field, but when I insert data, I get a foreign key error, and tried in CASCADE, RESTRIC etc mode and it does not work, validate that the IDs of the tables be primary keys, the...
asked by 21.04.2018 / 03:56
1
answer

Insert with several records with PDO PHP using a loop

I have this "add" function, which adds a product code 'X' in a table called "INVENTORIES", works well for me, but I want to add a fragment of code in PHP that I insert in a table called "PRECIOSXPROD" the product code for 'Y' times according to...
asked by 16.04.2018 / 21:30
1
answer

Insert in MySQL with Android Studio using Legacy does not work

Like the last time you helped me in a very fast and effective way I come back to share my code. I try to insert a record in a MYSQL from an App developed on Android and although it seems that everything works there is something that escapes me....
asked by 03.04.2018 / 09:21
2
answers

Insert 2 primary key of 2 tables in a third one that goes to relational

I have 2 tables. Company Table and Table Categories Both tables would not be related initially, but then we need to create a third table. Table category x company. The query must dump all companies and all categories to the third tab...
asked by 21.09.2017 / 18:59
0
answers

Call to a member function bind_param () on boolean

I want to upload update data and I can not. PHP: include 'includes/conexion.php'; $mat=$_POST["Id_materia"]; $sql= "DELETE FROM tbl_notas WHERE (Id=?) AND (Id_materia=?); "; $sql .= "INSERT INTO tbl_notas(Id, Id_materia, Esc1, Des1, Otr1, Trim...
asked by 03.07.2017 / 02:40
0
answers

Massive insertions in MongoDB with Python

I'm using python + MongoDB with pymongo So far everything is fine but now I would like to optimize the insert, what I do is read a csv with 50000 rows and create a loop to read row by row, going to json and insert (insert), it takes a long ti...
asked by 16.04.2017 / 23:24