Questions tagged as 'pdo'

1
answer

Is using PDO the safest way to connect to a DB with PHP?

I am a beginner in PHP and would like to know if PDO (PHP Data Objects) is the safest way to connect to a database? I also need an example of how to make this connection and insert / select data.     
asked by 09.06.2015 / 15:26
3
answers

What is the difference between bindParam and bindValue?

What's the difference between PDOStatement :: bindParam () and PDOStatement :: bindValue ()?     
asked by 17.09.2015 / 06:27
1
answer

SQL LIMIT parametrized in PHP with PDO

A few days ago, I stopped using the mysql_* functions (because they are already obsolete), and switched to PDO . I have a function that does query the database, but I'm having some problems using LIMIT with prepared statem...
asked by 23.02.2015 / 16:00
3
answers

How to check if you have connected to the database?

How do I check if my PHP + PDO code successfully connected to the MySQL database? With the code it works: <?php /* Connect to a MySQL database using driver invocation */ $dsn = 'mysql:host=localhost;port=3306;dbname=bancoservico'; $us...
asked by 24.09.2016 / 20:14
2
answers

Delete multiple rows dynamically with PDO?

Let's say I have a user table ( id | nome ) and that where they are listed (client-side ) I can select multiple of them and delete them at the same time. > How could I do this on a MySQL database using PDO? I know that MySQL allows th...
asked by 20.06.2015 / 22:43
1
answer

Laravel 5 and Sql Server

I need a help, I made several attempts to connect Laravel with SQL Server and all without success. However, I was able to run pure php using sqlsrv_connect and Code Igniter. Windows 10 64 bits. Wampserver 2.5 32 bits. PHP version: 5.5.12 (TS,...
asked by 16.11.2015 / 18:58
2
answers

Increase dblib connection timeout with PDO

In a connection to an external server ( MS SQL SERVER ), from another system with which I integrate some data, it is extremely slow, and thus the connection to the database gives error. How to increase the timeout of the PDB connection with...
asked by 05.09.2016 / 16:55
3
answers

Is there an application security vulnerability when using AJAX?

I'm a HTML/CSS/PHP programmer for a few years and incredible and impossible to look at, I'm just entering the Javascript world with jQuery and AJAX now. My question is whether the security level is affected when we pass para...
asked by 30.08.2014 / 22:06
1
answer

PDO connection pooling management

We often see in multithreaded applications that use a connection to a database, the use of a connection polling , in which it stores a pool of open connections. way to increase performance so that you do not have to open connections at all time...
asked by 28.07.2014 / 19:21
1
answer

Invalid parameter error while doing PDO take action

I'm trying to learn how to use PDO, so I've already gone VERY looking for everything to understand it. So I'm at a point that left me pretty confused. I have the following code, it is the: _conecta_banco.php <?php class conectar_banco...
asked by 12.06.2014 / 05:42