Re: ibase_fetch_row

From: Date: Sat, 04 Nov 2000 06:27:00 +0000
Subject: Re: ibase_fetch_row
References: 1 2 3  Groups: php.db 
Request: Send a blank email to php-db+get-4207@lists.php.net to get a copy of this message
Ok.. I've tried your code and I got 0 resultsets.... In more details: I have a store procedure on interbase that makes the user login in one table called loginid. The store procedure needs 3 input values: username, passwd and IPAddress and returns loginid and userid. If using isql I call the store procedure, isql answer me with the loginid and userid. I can't get those two values using ibase_fetch_row. Some folks said that php4 is having some trouble with interbase and my current interbase version module it's 1.44. Tonight I'll update it and try again. Here's the code I'm using: <?php $IP = $REMOTE_ADDR; echo ($username .... At this point I verify all information before calling the store procedure...... ibase_pconnect(DATABASE,'SYSDBA','masterkey') or die ("<script language='javaScript'> alert('" . ibase_errmsg() . "'); </script>"); $stmt="select LOGINID, USERID from NEWLOGIN ('$username','$passwd','$IP')"; $Q = ibase_query($stmt) or die........ //trying your code I got 0 resultsets but once I looked at database, the user was logged and everything looks just fine... just the returning values from the store procedure it's not available .... $i = 0 while ($results = ibase_fetch_row($Q)) { $i++; } echo "We got $i resultsets; // I've tried exchange ibase_pconnect for ibase_connect without any results..... Lutz Brueckner wrote: > Mauricio Junqueira <mauzero@netzero.net> wrote: > > > I'm trying to use ibase_fetch_row to get the result of a previous ibase_query. > > as: $q = ibase_query($query); > > $r = ibase_fetch_row($q); > > > but when I try to get the results from $r, as in $userid = $r[0], I got a null > > value. > > I would guess your query just don't return a result. Try it > this way and look what will happen: > > $dbhandle = ibase_connect($db, $user, $pw) or die(ibase_errmsg()); > $result = ibase_query($query) or die(ibase_errmsg()); > $i = 0; > > while ($result = ibase_fetch_row($result) { > $i++; > } > echo "We got $i resultsets"; > > If this does not help, just post a more complete part of > your code. > > Lutz > > -- > ibWebAdmin 0.3alpha *** web-based InterBase database administration > *** download the latest version from http://home.knuut.de/lb/ > *** > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#4207) next »