PROBLEM WITH PARAMETERS IN PDO SQLSERVER

Discuss everything related to ApPHP MVC Framework. All versions. Any questions related to the Framework developing or using should be posted to this forum.

Moderators: alexandrleonenko, alexmst

hliasmin
Newbie
Newbie
Posts: 8
Joined: May 29th, '10, 14:12
Location: Greece

PROBLEM WITH PARAMETERS IN PDO SQLSERVER

Postby hliasmin » Aug 11th, '17, 21:40

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?????????????????????????
Minogiannis Ilias

administrator
Site Admin
Site Admin
Posts: 6003
Joined: Jan 7th, '09, 23:18
Contact:

Re: PROBLEM WITH PARAMETERS IN PDO SQLSERVER

Postby administrator » Aug 13th, '17, 11:21

What error do you see in debug?
We're working now on changing code to be suitable for mssql also.


Return to “ApPHP MVC Framework {developers/users}”