Questions tagged as 'pdo'

1
answer

Error closing session with token

I explain I'm doing a login with 3 profiles and I managed to identify what profile I enter and be sent to your module until there is everything right the problem arises when I close session is blank screen and does not return to the index where...
asked by 17.08.2017 / 15:34
1
answer

how to use the Toasts of materialize

Greetings friends I would like to change the model of how to show my mjs of alerts for when I insert, delete and update. I would like to change these alerts for the Toasts of materialize. I append the code as I do to show the alerts. link of mat...
asked by 06.08.2017 / 15:51
0
answers

Fatal error: Uncaught PDOException: SQLSTATE [23000]: Integrity constraint violation: 1452 Can not add or update to child row: a foreign key constraint

I'm trying to make an insert with PDO and I get that error How can I solve it? This is the code of my tables: CREATE TABLE 'productos' ( 'Id_Producto' int(11) NOT NULL AUTO_INCREMENT, 'Nombre_Producto' varchar(45) DEFAULT NULL, 'Pr...
asked by 24.07.2017 / 11:06
0
answers

Insert an array with PDO

I have a problem trying to insert an array This is the insert code public $campos=array("id_transaccion","id_producto","id_empleado","cantidad","id_cliente","fecha"); public $tabla="ventas"; public $tablaWeb="transacciones"; public...
asked by 07.08.2017 / 23:38
0
answers

Auto-complete a table from a select with mysql data and continue adding more items to the table

What I want to do is that in a form have a select with the products and next to the select an input type = button where you add it to a table the data and that you can continue selecting more products to add it in the same table. This is the...
asked by 12.07.2017 / 21:08
0
answers

insert and update current amount with the new amount

I would like your opinions on what is the most advisable thing to do in this case: first I have a table of values that is where the amounts are recorded in newspapers. trasvalores: Id_trasvalores monto_trasvalores_apertura Amount_Transfe...
asked by 25.07.2017 / 23:50
1
answer

schedule weekly mysql and php inserts

I am using php with pdo and mysql in my project I need to create schedules, breaks and the positions in which they have to be weekly, I must create 2 weeks ahead of the current week, but there are some rules: they must be ordered first by order...
asked by 28.07.2017 / 04:05
1
answer

Create Table Foreign key failure

I want to create 3 foreign keys in a table such as this: DROP TABLE IF EXISTS puo;CREATE TABLE IF NOT EXISTS puo ( ano INT ( 4 )NOT NULL, empresa CHAR ( 8 )NOT NULL, acro_proyecto CHAR ( 10 )NOT NULL, partida VARCHAR ( 100 ) NO...
asked by 21.07.2017 / 00:28
0
answers

CRUD PHP does not enter data

I have these values inside a case: case 'upgrade': $alm->__SET('acronimo', $_REQUEST['acro']); $alm->__SET('cantidad', $_REQUEST['cantidad']); $alm->__SET('compania', $_REQUEST['comp']); $model->Ac...
asked by 15.06.2017 / 12:09
2
answers

Error connecting to the database using PDO

I am trying to connect my web with a sql-server database (use Microsoft SQL Server Management Studio). I have entered the database using SQL Server Authentication using username and password that I already had created. To expose my problem we...
asked by 14.06.2017 / 21:42