Questions tagged as 'pdo'

1
answer

How do I get the query passed by get in pdo from id to code

I'm starting on pdo now, so the games will start for me shortly and my doubt is as follows: I am working on another code from a friend and in his code the get to display the information are taken values by id, however I want the information to b...
asked by 26.06.2017 / 05:35
0
answers

PROCEDURE query slowness problem

There is an email sending routine on my system. Where a bat of windows runs a php file that sends it. The problem is in a stored procedure , which runs directly by the bank, brings the result very quickly ( 0.070 sec question), but when...
asked by 11.07.2017 / 15:43
1
answer

Ajax function with php is not working

I have this code plus ajax does not have a value $.ajax({ url: 'php/vizCliente.class.php', type: 'POST', data: { update: '1' }, cache: false, datatype: "json", error: function(e) {...
asked by 22.06.2017 / 02:59
0
answers

How to Update 2 tables with Switch case and database data and others coming from an xml return?

switch / case that runs in the bank to see which id ta and get the value in the switch and pass to the other table in the update ... is there any error anyone could help? <?php require_once("core/config/config.php"); if (isset($_POST[...
asked by 24.06.2017 / 17:45
0
answers

PDO, Select a query with some fields, of a certain user and code

I need to set up a query where I will only have 5 fields ( STATUS , ID_USUARIO , PACKED , ID_TRANSACAO and ENTREGUE ). I need when I change from STATUS change in another table, and update in the current fi...
asked by 24.06.2017 / 05:48
1
answer

Two selects in a while with PDO

Hello, I'm migrating from MySQL to PDO and I'm having a hard time putting two selects in a table. try{ $CON = new PDO("mysql:host=localhost;dbname=tcc", 'root', '1234'); } catch (PDOException $e) { echo "Erro : ".$e...
asked by 05.06.2017 / 02:39
2
answers

accent problem when saving to database [duplicate]

There is a problem with me, when I save a value in the database, it saves without any accent. All my code on the page is utf8, my whole database is utf8, the tables are utf8 and where the insert is utf8 When I put utf8_encode () in the c...
asked by 01.06.2017 / 14:04
0
answers

PHP Language Comparison

I need to compare in the table of products if the language esp and ing are filled ... When I register the product it registers as language 1 (by). Then the client has to register the 2 (ing) and 3 (esp). $pdo = db_connect(); $listar = $...
asked by 28.05.2017 / 20:18
0
answers

Check PDO query return to delete or insert records

I am making a select for deletar or inserir records in my bd according to the amount of records returned, but the tests I have done are not correct, I do not know exactly how to count the records in a return pdo . I'v...
asked by 30.05.2017 / 15:39
1
answer

Insert class in PHP does not work and shows no error

I have the following code in php : <?php class Users extends DB { private function verifyUser($email) { $select = self::conn()->prepare("SELECT * FROM 'users' WHERE email = '{$email}'"); $select->execute(...
asked by 22.05.2017 / 17:24