Page 1 of 1

PROBLEM WITH PARAMETERS IN PDO SQLSERVER

Posted: Aug 11th, '17, 21:40
by hliasmin
Hallo. I am using the MVC framework to develop a site which has to be connected to sql server 2008. So, i used the sqlsrv (after fixing the CDatabase.php)
I am having a problem when i am trying to make a select query using parameters

For example I want to select all the users. If i use the above code
$this->_db->select("select * fom users where username='" + xxx+ "' " ) every goes right.
When i use the above code $this->_db->select("select * fom users where username=' :username', array(':username'=>'xxx') ) every goes wrong. I get empty return even though i get no error

I think that it is not specific problem. It is more abstract. It has to do with accessing parameters in PDO when trying to connecxt to sql server

Can you help me with this problem?????????????????????????

Re: PROBLEM WITH PARAMETERS IN PDO SQLSERVER

Posted: Aug 13th, '17, 11:21
by administrator
What error do you see in debug?
We're working now on changing code to be suitable for mssql also.