Questions tagged as 'pdo'

0
answers

First time using commit () and rollback ()

Good evening Personally, I use the code below to do two transactions on the bank: $sqlinsert = $mysqli->prepare("INSERT INTO tbl_pessoafisica(cpf,senha,nome,email,celular) VALUES (?,?,?,?,?)"); $sqlinsert ->bind_param('sssss', $cpf,$sen...
asked by 01.02.2018 / 02:55
0
answers

BD Search in more than one column, PDO OOP

Good afternoon, I have these two methods below, they work normally, but I can only do the search in a table column, but I need to do in more than one, I tried to use two-dimensional array, but without success. Would anyone have any tips on how t...
asked by 06.02.2018 / 20:10
0
answers

Register using PDO, error 22527?

I have this PHP code below that will be executed after submitting the form to register in the database. If you pass the validation, a new user will be created and done HASH and then the insertion in the database!      if (input::exists()) {...
asked by 25.01.2018 / 14:14
0
answers

Make sql update with PHP object

I have a model object named student: class Aluno { //ESTA CLASSE TEM Q SER IGUAL AO BANCO DE DADOS public $nome; public $sobrenome; public $email; public $senha; public $unidadelocal; public $unidadecurricular;...
asked by 02.02.2018 / 12:17
0
answers

get_where for PDO

I want to change get_where to mysql or PDO, but I do not know! Help ...! public function get_where($table = '', $where = NULL, $limit = NULL, $offset = NULL) { if ($table !== '') { $this->from($table); } if ($where...
asked by 18.01.2018 / 22:57
0
answers

Should I learn PDO and DAO in PHP?

When should I use DAO in PDO in PHP? I'm taking a course where the teacher teaches DAO. But will I use it in my routine as a PHP developer? Why be the DAO?     
asked by 17.01.2018 / 20:55
0
answers

How to do sum with php or SQL?

Hello I want to sum the total values of the result of a query in PDO. However, when executing the command the following message appears in the console:    Object of class PDOStatement could not be converted to int in /Applications/MAMP/ht...
asked by 26.12.2017 / 19:17
0
answers

How do I transform mysql into pdo?

I have this function in mysql. public function get_logst(){ $this->connect_database(DAT5); $querygetl = mysql_query("select HeroName, ObjIdx from ObjLog where LogType = '5' and LogSubType = '2' and DataType = '2' o...
asked by 25.12.2017 / 15:02
0
answers

PDO insert only runs once

I am studying PDO to be able to redo the functions of a crud that I use in mysqli , but I have a problem, when I do an insert with this function the first time it inserts the value in the database, but if I call function again it on...
asked by 23.12.2017 / 23:35
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