Questions tagged as 'pdo'

1
answer

How do I use password_hash in select

How do I sign in with the entire encrypted password? I used password_hash and now for me to login like I do? if(isset($_POST['loggin'])) { $user = trim(strip_tags($_POST['user'])); $txtpassword = $_POST['p...
asked by 18.12.2015 / 22:42
1
answer

PDO code optimization [closed]

Hello, I am studying a way to increment a value before saving to the database but I need help, searching in Google for parts I was able to assemble the code and yes it works, its objective is to update a value in the database, but I'm finding th...
asked by 24.11.2018 / 02:47
1
answer

How can I correctly use a PDO object for a select query [closed]

I followed the recommendations of php.net, to do a select in a particular database using the PDO, however I do not know if I'm doing it right, I wonder if you can help me $duosig = "SELECT NOMCLI FROM SINAF019"; $stm = $lokos->query($duosig...
asked by 08.07.2015 / 15:38
2
answers

MySql Conversion To PDO

@$sql_usuario = "SELECT * FROM usuario "; @$qry_usuario = @mysql_query($sql_usuario ); @$linha_usuario = mysql_fetch_array($qry_usuario ); Array ([0] => 6 [u_id] => 6 [1] => 54354554 [u_cod] => 54354554 [2] => 54354554 [u_cod] => 54354554)...
asked by 29.11.2018 / 15:34
1
answer

How to return data from a class within an option

Good afternoon, guys, I have a problem. I'm a beginner in object-oriented programming and I'm trying to do a select / option that takes values from within the database into an employee table. The problem is that when I make the request to the ba...
asked by 22.11.2018 / 19:47
1
answer

Column id with primary key and auto increment is returning null MYSQL PHP

Good night guys, this is the following, I have an application that was working until these days, today when I was adding a post in the database, my id_post that is Primary Key and Auto_increment is not being added, it returns the error that it m...
asked by 14.09.2018 / 00:39
2
answers

"Catchable fatal error" PHP error

I have a search field in which put a date dynamically, posting that date returns me the records of the bank below, however I caught in this error that happens in foreach . Here is the code: DAO: public function ListaPorTipoB($obj){...
asked by 24.03.2016 / 20:06
1
answer

Help with MySQL connection

I am creating a CRUD system for practices, and my code is giving error in my prepare() . Index.php <?php require_once 'core/init.php'; // Abre a conexao com o banco de dados $pdo = db_connect(); // SQL para contar o total de reg...
asked by 27.12.2016 / 22:53
2
answers

Destroy session when changing profile on mobile and affect pc

Hello, How do I solve the problem of when someone edit the profile on mobile and at the same time is logged on the pc, do not give php error as 'Undefined variable' in the pc because the data are no longer the same as the mobile .. For exa...
asked by 14.12.2015 / 22:20
1
answer

Single user name and password converting mysql_ * to PDO

I need to update a legacy code and for that I need to make two modifications to it. The first modification is to abandon the mysql_* functions and use the PDO. The second is to update the database so that I can not register two user...
asked by 26.12.2014 / 09:45