Skip to content

Tag: pdo

Select active data by order

I have 2 tables posts and categories, There is one-to-many relation between both tables. Here are the two tables: There is a relation between category_id and c_id, So that the category_id in the posts table refers to the category id c_id. The post_order and c_order are used to order both posts and categories.…

PHP get return value of stored procedure

I have pleasure to work with legacy PHP application using SQL Server via PDO. How in PHP can I retrieve return value of stored procedure which is using RETURN statement as output channel? Example procedure If possible, I would prefer to not modify procedure. I am aware that there are similar questions, but th…

Impossible to load pdo driver on Windows Server 2016

Im trying to load the pdo driver for firebird database on a windows server 2016 (64 bits). Configuration is the next : Firebird in 32 bits successfully installed. Apache 2.4 successfully installed (Apachelounge binary, 32 bits). Apache configuration properly set (installed in C:/Apache24) PHP 32 bits successf…

How to check fetched result set is empty or not?

For example: AND How to check if result set is empty or not Answer Check $data variable like: If the result of SELECT query did return any data, variable $data will contain a non-empty array/object which evaluates to true, and a false-like value otherwise.

Select from database only values not seen before [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 years ago. Improve this question Let’s say that I have a database with this data stored: How can I select all of this v…