# PDO FETCH OBJ Return False

**URL:** <https://www.phphelp.com/t/pdo-fetch-obj-return-false/23279>\
**Category:** General Database (Oracle, SQL Server, etc)\
**Created:** [August 28, 2014, 2:03pm UTC](https://www.phphelp.com/t/pdo-fetch-obj-return-false/23279 "2014-08-28T14:03:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tompasto](https://www.phphelp.com/letter_avatar_proxy/v4/letter/t/85e7bf/32.png) [@tompasto](https://www.phphelp.com/u/tompasto)\
**Post date:** [August 28, 2014, 2:03pm UTC](https://www.phphelp.com/t/pdo-fetch-obj-return-false/23279/1 "2014-08-28T14:03:22Z")

</div>

Hello,

I did a update of my php server version and now one of my PDO query doesn’t work anymore (it was working for more than a year).  
It return Boleen false.  
I’m connected to a Mssql server.  
My connection is correct because all other queries work fine.  
My SQL query work fine into Ms sql management studio console.

Someone can tell me what’s wrong.  
Here my query:

\<? $db = new UseDB(UseDB::MyDB); $SQL = "DECLARE @vWL\_NUMBER varchar(10); exec @vWL\_NUMBER = uspGetNextControlCode 'WL\_NUMBER'; select @vWL\_NUMBER as WL\_NUMBER "; $q = $db-\>query($SQL); $row = $q-\>fetch(PDO::FETCH\_OBJ); $WL\_NUM=$row-\>WL\_NUMBER; ?\>

---

<div class="post-metadata">

**Author:** ![grwebugy](https://www.phphelp.com/user_avatar/www.phphelp.com/grwebugy/32/1076_2.png) [@grwebugy](https://www.phphelp.com/u/grwebugy)\
**Post date:** [August 31, 2014, 1:32am UTC](https://www.phphelp.com/t/pdo-fetch-obj-return-false/23279/2 "2014-08-31T01:32:35Z")

</div>

Did you lookup specifics about whether there was an update to the PDO module?

You also may want to do a try/catch to find the specific error:  
[http://php.net/manual/en/language.exceptions.php](http://php.net/manual/en/language.exceptions.php)
