Questions tagged as 'pdo'

1
answer

Validation function pdo php

I have the function below that makes an insert in the table ESP35302_TMP but before entering I need to do a validation in this table, if there is already the bar code number that I am inserting, if it already exists that it does not need to exec...
asked by 25.10.2016 / 18:29
1
answer

Skip beginTransaction commit PDO MYSQL

What happens in practice when I omit begin transaction and commit in a PHP script using PDO? I have a load script, which processes the school data, with each school that finishes processing I make a insert . This code belo...
asked by 31.03.2016 / 05:32
1
answer

Update table using PDO with 2 foreachs

Hello, public function update($idsimages, $dir_images) { try { $stmt = $this->db->prepare("UPDATE images SET dir_images = :dir_images WHERE id_images = :id_images"); foreach ($idsimages as $idsimage) { foreach ($dir_i...
asked by 29.03.2016 / 21:41
0
answers

How do I get a file from within the database?

I'm using postgresql as sgdb, and I'm saving .txt files in bd, so far, all right, it's already working fine, but I'm not finding a way to get the contents of the txt files saved in bd, I'm using php with PDO for connection to bd The type of c...
asked by 30.03.2016 / 00:48
1
answer

Failed to connect to web bank - Access denied for user [closed]

ERROR:SQLSTATE[HY000] [1045] Access denied for user 'usuario_do_banco_web'@'meu_ip' (using password: YES) My php connection file: (config.php) Note: Replace the different credentials just to illustrate.      $pdo = new PDO("mysql...
asked by 18.05.2016 / 19:45
0
answers

Do not display null lines in mysql results

I have a simple mysql query SELECT usr_contact FROM $usr_ I use PDO to connect this table has rows that have empty fields so ----------------------- | id |usr_contact| ----------------------- | 1234 | null | -----------------...
asked by 08.03.2016 / 20:41
0
answers

PDO + DAO, am I doing this right?

I started to take a look at PDO and DAO but I still did not understand how to do it right. I had some problems with the bindParam function that does not let pass method get there had to do a gambiarra. And also how to handle the connection...
asked by 13.03.2016 / 17:11
1
answer

MVC connection, which one use MSQLi or PDO? [duplicate]

I'm starting to program a PHP MVC, what kind of connection is most recommended: MSQLi or PDO and why?     
asked by 14.03.2016 / 21:16
1
answer

Error checking existing record pdo

I have the following PDO class: <?php abstract class database{ /*Método construtor do banco de dados*/ private function __construct(){} /*Evita que a classe seja clonada*/ private function __clone(){} /*Método que dest...
asked by 15.02.2016 / 14:02
1
answer

Problems deleting table data with :: PDO

Can anyone explain to me what the error is or if there is any flaw in the script ?? As far as I know this is correct, it does not work. In the script it takes the ID of who followed and the ID of who was followed and should remove by the para...
asked by 10.02.2016 / 14:13