NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
num_rows in debug mode every return 0


Joined: 27 Nov 2011
Posts: 1
Reply with quote
phped 6.0 (6030), php 5.3.3, debug in HTTP mode(3rd party WEB server), ??? listener 4.0.5

example

$email = "";
$pass = "";
$token = '2f0895887121f6c783bbd0023b7a51e4';

$statement = $connection->prepare("SELECT email,pass FROM user_candidate WHERE token = ? LIMIT 1");
$statement->bind_param("s",$token);
$statement->execute();
$statement->store_result();

$nm = $statement->num_rows;
echo(nm);

$statement->bind_result($email, $pass);
$statement->fetch();
$statement->free_result();
$statement->close();



in run mode (Ctrl+F9, and in ext webbrouser) $nm return a 1, in debug mode( F9 ) $nm every return 0

Why ???
View user's profileFind all posts by testmodeSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
This code does not depend on debugger functionality and therefore results should not depend on whether it is executed with or without debugger.
First, please check whether you run the code agains the same database in the two cases -- with and without debugger Smile
If the DB is the same but the values are different, it may be resulted from a bug in corresponding extension -- mysql driver for example -- you know such errors as uninitilized data? It's better to try newer php -- 5.3.8 for example.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
num_rows in debug mode every return 0
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic