Questions tagged as 'pdo'

1
answer

How to limit the number of pages displayed on a page?

With this question that already has a workaround, I got as a result a paginação com PDO but I have one more problem that will possibly be the target of a reward next week. As you can see in the image below, I have this page with +...
asked by 03.10.2014 / 22:03
2
answers

Close PDO connection

I have worked with other languages before working with PHP and in some the framework when you opened a connection with the bank it was good to finish it in the PDO so I realized there is no function in the PDO class that closes this connection....
asked by 19.05.2014 / 15:18
2
answers

How to install the PDO_PGSQL driver in ubuntu?

I have already installed PHP 7, Apache 2 and Postgresql 9.5. I have already enabled the extension in php.ini but it does not work. In Windows just enable this extension in php.ini that already works but here in Ubuntu was not...
asked by 13.09.2016 / 17:44
2
answers

Output in json with json_encode ()

   json_encode () - Returns the JSON representation of a value If I do: $foo = array('a', 'b', 'c', 'd', 'e'); echo json_encode($foo); I'll get: ["a","b","c","d","e"] So far so good, I'm getting an array and turning it into a json...
asked by 10.11.2015 / 16:18
2
answers

Delete cascading table data

I have some relationships in my tables and I'm wanting to delete them in reverse. In my system the user will have the option of deleting a category, here comes my doubt as I will do this, because it should delete the pages, category descript...
asked by 13.06.2015 / 20:35
1
answer

Error in PDO query

I am creating a registration page where I have several tabs, according to the structure below: <div> Aba 1 </div> <div> Aba 2 </div> <div> Aba 3 </div> <div> Aba 4 </div> e assim vai... Inside...
asked by 04.02.2015 / 15:09
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

I can not create class in php and use connection with PDO

I am creating a class that looks for database data to be displayed. For example, one of the functions of the class is to pick the date, from a die, in the bank and display it on the screen. The way I'm doing, it's not working. Follow my code...
asked by 29.10.2015 / 03:29
2
answers

Navigate query records with PHP PDO

I have always worked with ASP connections using ADODB and navigating the logs that the query returned to me was not a problem since they were: <% rs.movenext //anda para proxima linha do retorno da query rs.moveprevious //anda para linha an...
asked by 16.04.2015 / 15:21
1
answer

display products by listed category of database with PHP PDO

I am having difficulty to list products by category, I created only one page and wanted to be dynamic the display of products according to the category listed in the database, but not right and in PDO do not know how do. So I created a va...
asked by 16.11.2015 / 23:37