What's wrong with my mysql statement?

Grazehell

2[H]4U
Joined
Jun 13, 2001
Messages
2,660
For the life of me I can't figure why my prepared statement isn't working on my LAMP server given that it works fine on WAMP. Can anyone figure this out? Anything wrong with the statement itself that might cause it to fail on one machine?

Code:
$query = $this->mysqli->prepare("SELECT * FROM post order by Status DESC limit ?, ? ");
$query->bind_param('ii',$lowerRange, $upperRange);
$query->execute();
$result = $query->get_result();

Its seems to fail when binding

LAMP
php 5.5.11
Myqsl 5.5.34
Apache 2.4.9
Mysqli enabled

WAMP
php 5.5.4
Mysql 5.5.24
Apache 2.4.2
Mysqli enabled
 
wrapped in this
if (!$query->bind_param('ii',$lowerRange, $upperRange)); {$query->errno;}
it just gives me 0.

I have no debugging software on the server because it's basically a production machine.
 
The very first values fed are 0,17. I restarted the server and now mysql is no longer accepting my password(recently reset it). So now no queries work now of course.
I would fire up a Linux VM with the same versions of the server software and see if it does the same thing with my prepare statement queries. This would be tomorrow. I am done for the night
 
Ok its turns out mysqlnd was not installed so I could not use the get_result() method.

After I installed it I was able to get my prepared queries going(they were the only ones that used get_result() ).
 
Back
Top