Board index   FAQ   Search  
Register  Login
Board index php forum :: Database mySQL & php coding

mySqli + prepare and bind problem

Codes here !

Moderators: macek, egami, gesf

mySqli + prepare and bind problem

Postby Gonzalos » Wed May 30, 2012 6:49 am

Hello I move my website to a new server with PHP Version 5.3.10 and mysqli 5.0.95. In my previous server I was using mysqli 5.0.92 and was working perfectly.

Now I found that when I do the binding It doesn't work.

For Ex. This code it doesn't work, but in my previous server was working perfectly
Code: Select all
$mySqli = $this->openConnection();
$stmnt = $mySqli->prepare("Call selecttUserFromCredentials(?,?);");
$stmnt->bind_param("ss", $userName, $password);
$result = $stmnt->execute();


But the following code works perfectly

Code: Select all
$mySqli = $this->openConnection();
$stmnt = $mySqli->prepare("Call selecttUserFromCredentials('". $userName. "','". $password. "')");
$result = $stmnt->execute();


Any idea what can it be, and how to solve it in order to continue working with the binding?

Thank you very much
Gonzalos
New php-forum User
New php-forum User
 
Posts: 8
Joined: Wed May 30, 2012 6:39 am

Return to mySQL & php coding

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.