Questions tagged as 'pdo'

0
answers

Recoverable fatal error: Object of class User could not be converted to string in C: \ xampp \ htdocs \ iedan \ model \ UserDao.php on line 27

I get the following error:    Recoverable fatal error: Object of class User could not be converted to string in C: \ xampp \ htdocs \ iedan \ model \ Username.php on line 27. I do not know what is due, here I leave the part of the code th...
asked by 13.06.2018 / 03:07
0
answers

Catchable fatal error: Object of class User could not be converted to string in

I have that error and I can not find the problem. The error is generated when you try to generate a PDF. It gives me problems in this line- >    Catchable fatal error: Object of class User could not be converted   to string in   /Applic...
asked by 08.06.2018 / 19:23
1
answer

Help with select based on SQL criteria, and postgresql

I'm trying to make a query with sql under one criterion Well, let me introduce the code. include_once "conexion.php"; /* Ejecuta una sentencia preparada pasando un array de valores */ $id = 1; $sql = "SELECT * FROM users WHERE...
asked by 04.06.2018 / 03:35
1
answer

Error UPDATE with PDO

I'm trying to update the data, but when I update it, I change the user_id, but I want to continue saving it. Function, public function actualizaPagador($id_pago,$id_usuario,$pago){ $db=BaseDatos::conectar(); try{...
asked by 01.06.2018 / 11:57
1
answer

Transactions with PDO and Singleton

I have the pattern singleton and a class ticket : public function registrar(){ //me conecto a la bd $conexion = Conexion::singleton_conexion(); try{ $conexion->beginTransaction(); $queryid="select comprobante from identi...
asked by 29.04.2018 / 17:33
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
2
answers

PHP-PDO - Get ID in a select (function login)

It's my first song here and I wanted to see if they could give me a little hand ... I have a login that works well for me, it makes the query to the table, it looks for the user and pass and if they are ok, it redirects me, it...
asked by 17.04.2018 / 21:35
0
answers

Problem with sources in FPDF

I am trying to generate a PDF, if I created everything in the same directory there is no problem, the problem comes when I call the function that will generate this doc.    Warning: include (font / helveticab.php): failed to open stream: No s...
asked by 19.04.2018 / 14:07
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

Fatal error: Can not use object of type Course as array in

Hello, I have this function that pulls out an array but when I try to get the name of the following form, for example [0] ['name'] tells me that the object of type Course can not be used as a matrix. public function mostrarCurso(){ $db = B...
asked by 11.04.2018 / 13:56