note 77208 added to function.mysql-num-rows
| From: | webmasterdasourcerernet at osu1 dot php dot net | Date: | Mon, 20 Aug 2007 12:42:10 +0000 |
| Subject: | note 77208 added to function.mysql-num-rows | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-129637@lists.php.net to get a copy of this message | ||
In one of my applications, I had to let an object know wether it exists in the database or not. I
found a cheap solution w/o the usage of mysql_num_rows():
<?php
class Object {
var $doesExist = false;
[...]
function load() {
$result = mysql_query('...');
$this->doesExist = ($res = mysql_fetch_array($result))
[...]
}
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 77.178.121.226
----
Manual Page -- http://www.php.net/manual/en/function.mysql-num-rows.php
Edit -- https://master.php.net/note/edit/77208
Del: integrated -- https://master.php.net/note/delete/77208/integrated
Del: useless -- https://master.php.net/note/delete/77208/useless
Del: bad code -- https://master.php.net/note/delete/77208/bad+code
Del: spam -- https://master.php.net/note/delete/77208/spam
Del: non-english -- https://master.php.net/note/delete/77208/non-english
Del: in docs -- https://master.php.net/note/delete/77208/in+docs
Del: other reasons-- https://master.php.net/note/delete/77208
Reject -- https://master.php.net/note/reject/77208
Search -- https://master.php.net/manage/user-notes.php