PHP Classes

PDO FETCH OBJ Return False

Recommend this page to a friend!

      Top level forums  >  PHP Specialists  >  General  >  PDO FETCH OBJ Return False  
Subject:PDO FETCH OBJ Return False
Summary:PDO FETCH OBJ Return False
Messages:1
Author:Thomas Vt
Date:2014-08-28 17:32:04
Update:2014-08-29 00:25:33
 

  1. PDO FETCH OBJ Return False   Reply   Report abuse  
Picture of Thomas Vt Thomas Vt - 2014-08-29 00:25:33
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;

?>