Questions tagged as 'pdo'

1
answer

Run function.php with confirm boostbox.js

I have a database.php file where I have the following functions: class Conexao(){ function Conexao(){} function Inserir(){} function Update(){} function select(){} function edit(){} } I have a pagina.php...
asked by 22.02.2017 / 03:59
0
answers

Triger after update as a solution to debit credit securely

I need to make an interface that guarantees the integrity of the customer's credit. In PHP, when we use LOCK explicitly in the PDO, with LOCK TABLES, if there is an inconsistency, when the same client object is in several processes relating even...
asked by 21.02.2017 / 20:18
0
answers

Problem with registration using PDO

I am creating a simple system to register in PDO (I am a beginner in this), and I am not succeeding in developing my connection string and in adjusting the INSERT to add data to the bank. It gives the following error:    Notice: Undefined...
asked by 09.03.2017 / 03:57
0
answers

AJAX does not update div by id

I am developing a login system, where I need to return the validation message to the user in a div on the login page itself, however the error message is appearing on the validation page. I am using Bootstrap and PHP with PDO Login.php: <...
asked by 10.03.2018 / 10:35
0
answers

Problem with Notices, object PDO

I have my class: public function SQL($sql, $arrayParams = null, $fetchAll = TRUE) { try { // Passa a instrução para o PDO $stm = $this->pdo->prepare($sql); // Verifica se existem condições para carregar os par...
asked by 02.03.2017 / 13:27
0
answers

How to install sqlsrv driver in pdo?

How do I install or sqlsrv driver in pdo? <?php function conectar(){ $pdo = null; try { $opcoes = array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION); $pdo = new PDO("sqlsrv:server;host=192.168.0.30\COMPASS;dbname=weset;", "sa","...
asked by 22.02.2017 / 21:01
4
answers

MySQLi vs PDO - Which is the most recommended to use?

With mysql_* entering the deprecated state, the PHP documentation recommends using the PDO and MySQLi. Which do you recommend for use? PDO seems to be more suitable for working with object-oriented only than at the same time I saw...
asked by 06.03.2014 / 18:10
2
answers

SQLSTATE [HY093]: Invalid parameter number problem in insert

I need to insert the following data through a form: TITLE DESCRIPTION PRICE HTML: <?php session_start(); session_destroy(); ?> <html> <head> <meta charset="UTF-8"> <title></title> &l...
asked by 17.05.2015 / 10:12
1
answer

Error to get last ID

Hello. I'm having trouble getting the last logged in ID. I have already made a lot of attempts, but the variable $ proximo_ID always returns me '0', or Empty. Could you help me solve the problem? if(isset($_REQUEST['btn-cadastro'])) { try {...
asked by 11.02.2017 / 21:05
2
answers

How to add everything in MYSQL

How do I add all of a table in MySQL for example .. I have the table tb_comment , so I want to add in each post(id_mark) the amount of rate that will have the total. For example, id_user 20 has the rate of 4 in id_...
asked by 11.12.2015 / 23:15