Questions tagged as 'pdo'

0
answers

Store query result in a session with PDO

I have a SELECT which generates results normally, but when I need to get the value of some column to use on another page it does not work. Query code and attempt to pass the result of a column to a session: $login = $conexao->prep...
asked by 30.10.2018 / 00:44
0
answers

List data for the Option

I'm trying to list database data for my options, but I do not know how to do this I've tried the following way down there, I want it when the form is submitted I want to send ID to that location, but not select I want to show descrição...
asked by 19.10.2018 / 22:45
0
answers

SQLSTATE [HY093], where the number of parameters is correct [closed]

I'm trying to get out of a procedure, however SQLSTATE [HY093] appears: Invalid parameter number: number of bound variables does not match number of tokens , I saw some questions that this is due to number of parameters, however the PDO is pass...
asked by 10.07.2018 / 23:31
0
answers

Pass variable into IN

I'm having trouble passing a variable into IN in MySQL - PHP - PDO. In the url it looks like this: /PESO=50&IDADE=18,20 Code: $read->FullRead("SELECT DISTINCT NOME FROM pessoas WHERE PESO =:peso AND IDADE IN (:idade)...
asked by 23.06.2018 / 20:17
3
answers

Display the result of a COUNT in the Database

The PHP code looks like this: $con = new PDO(SERVIDOR, USUARIO, SENHA); $sql = $con->prepare("SELECT COUNT(id) FROM quiz;"); $sql->execute(); $n = $sql->fetchObject(); And the HTML code looks like this: &l...
asked by 28.05.2018 / 23:34
2
answers

Request via GET

I'm trying to create a search system using a Request to get the search result. I am not able to bring the product data for the searched title. Whatever the searched word, it always brings me the last item in the product table. Search or...
asked by 10.06.2018 / 23:43
1
answer

Help with Ajax and FORM Requests

I'm using the form below to search for products ... <form action="prod_index_consulta.php" enctype="multipart/form-data" name="busca" method="post"> <span>Busca Avançada</span> <a class="search" id="<?php echo $...
asked by 10.05.2018 / 00:21
1
answer

Problem with Docker installation pdo

I have a problem with my containers in docker, I was trying to raise a Lamp with docker compose, with the default image of php: apache and mysql, but when I install the PDO this error appears. SQLSTATE [HY000] [2002] No such file or directory...
asked by 30.04.2018 / 20:07
3
answers

How to do SELECT on more than one database table?

I have two tables in the database: zip and users. Can I make a single query to get fields from the two tables? Both have idCep. I want to get the address data from the cep table and the name and user of the users table. As I'm working with ph...
asked by 25.04.2016 / 20:31
0
answers

Error connecting PHP 7 (Debian) with Sybase 16

I have the following difficulty: I need to configure the PHP environment to connect to a Sybase 16 base. I am not a PHP programmer and I am helping another colleague. Everything that has been tried so far does not work. The code is: $connec...
asked by 14.12.2017 / 15:16