note 14406 added to ref.ibase.php
| From: | dbadmin at avenet dot stw dot uni-erlangen dot de | Date: | Mon, 30 Jul 2001 12:19:38 +0000 |
| Subject: | note 14406 added to ref.ibase.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-16053@lists.php.net to get a copy of this message | ||
@Lee:
mysql_num_rows you can substitute with the following code (I know, it's ugly, but currently
dont know any other possibility cause ibase doesn't give you the number of affected rows after
executing a query):
$count = 0;
while ($row=ibase_fetch_row ($resultID)) {
$count = $count + 1;
}
---------------------------
for mysql_insert_id you can use something like this:
$resultID = ibase_query($db, "SELECT MAX(ID) FROM mytable");
$row = ibase_fetch_object($resultID);
$previous_generated_id = $row->ID;
ATTENTION: you should use this substitution-code DIRECTLY after your INSERT-query to get the
generated ID of this INSERT, before another record may be inserted!!
----------------------------
for mysql_fetch_row you don't need a substitution, use ibase_fetch_row instead, same
functionality
http://www.php.net/manual/en/ref.ibase.php