Questions tagged as 'pdo'

1
answer

Problem trying to insert into mysql using PDO

I have a problem when I try to insert from a form <form method="post" action="../../controller/inserirContato.php"> <label for="name" class="nameLabel">Meu nome é: </label> <input id...
asked by 09.12.2014 / 05:39
1
answer

Doctrine DBAL database DB operations

To make bank operations better and to use (or which to use): Data Manipulation Query-builder To work with data manipulation? And how would I do it to do bank operations with him for example: #inserção no banco $sql = INSERT INTO t...
asked by 03.09.2014 / 18:53
1
answer

What causes "Call to a member function fetchAll () on a non-object in ..."?

I made a class to connect to the database using PDO and at the time I get the data from my table it gives this error. This is the code: require_once('../class/connection.class.php'); $db = conection::getInstancia(); $query = $db->query(...
asked by 10.06.2014 / 17:15
1
answer

PDO does not execute query

I have a form that does a search via PDO, but when I run it, it does not return anything to me. $PDO = db_connect(); $busca = $_POST['usuario']; $vbusca = "%".$busca."%"; $sql = 'SELECT nome, tipo, cor FROM livro AS t WHERE '; var_dump($sql...
asked by 17.12.2018 / 16:59
1
answer

Class "PDO" not found after upgrading from PHP 7.2.13 to PHP 7.3.0 in Debian 9

On a server with Debian 9, I upgraded PHP from version 7.2.13 to version 7.3.0, but now the PDO does not work anymore. Fatal error: Uncaught Error: Class 'PDO' not found. Libs are already installed: root@/# apt install php7.3-pdo Reading...
asked by 13.12.2018 / 23:51
0
answers

PDO Duplicate Data Update Problem

I'm having a problem updating if I remove ! from if (!empty($data['slug'])) the code just does not work, and if I leave ! it simply says that there is its own value without changing any detail, could someone please help me....
asked by 11.12.2018 / 19:12
2
answers

Avoid duplicating with PDO in image upload

In that upload code. The class uploads an audio. Everything works fine, but, I do not know how to do that "identifies" and "id_user" can manage the upload and restrict to only when those two are different or is "empty", the upload is done. There...
asked by 03.12.2018 / 17:08
0
answers

Select a selectbox from a click of a table

Hello, I'm trying to pass the data from a table pulled from the database to the fields that belong to update on the same page as the one that I registered, but I can only pass the data from the textbox to the page in php. Below the logic I was...
asked by 27.11.2018 / 19:51
0
answers

PHP - Queries to print links in the nav-bar in a loop

For ordinary users I have 10 queries (nav-bar default) and for registered users I have 30 queries (nav-bar default + nav-bar related to the user page), just to print on the screen the link to querystrings , a guy told me that I should escape the...
asked by 11.12.2018 / 01:39
0
answers

Blank table space

Hello, I have a small problem, the table gets one more column, I looked for the error and read the code several times and nothing to solve If anyone can help, thank you <table> <tr> <? $table = 'Products'; $col...
asked by 18.11.2018 / 05:40