note 100544 deleted from mysqli-result.num-rows by danbrown

From: Date: Fri, 22 Oct 2010 15:05:39 +0000
Subject: note 100544 deleted from mysqli-result.num-rows by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-173376@lists.php.net to get a copy of this message
Note Submitter: belkin dot labs at gmail dot com ---- I have tried empty($result->num_rows) and noticed, that this does not work as I expected. When $result->num_rows == 1 results in true empty($result->num_rows) results also in true. Notice, that num_rows is inaccessible member, so use empty($result->num_rows) with care. this is strange to me, but $i = $result->num_rows; // $i == 1 var_dump(empty($i)); // true

« previous php.notes (#173376) next »