Re: error code = -504 Cursor unknow

From: Date: Fri, 06 Apr 2001 09:44:17 +0000
Subject: Re: error code = -504 Cursor unknow
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-8307@lists.php.net to get a copy of this message
Mauricio Junqueira wrote: > Mauricio Junqueira wrote: > >> >> Hello, this is my first attempt to query and print a result coming from a >> database, in this case interbase6. >> >> I got the following error: InterBase: Dynamic SQL Error SQL error code = >> -504 Cursor unknown in maingeral.htm on line 8 >> >> Here's the code: >> <? include("php/header.php"); >> >> ibase_pconnect(BANCO,DBUSER,DBPASSWD) >> or die ("<script language='javaScript'> alert('" . >> ibase_errmsg() . >> "'); </script>"); >> >> $stmt = "select count(*) from soldcars"; >> $query = ibase_query($stmt) or die ("<script >> language='javaScript'>alert('" . ibase_errmsg() . "'); >> </script>"); >> $result = ibase_fetch_row($query); // THIS IS LINE 8 >> $TOTSOLD = $result; >> ibase_free_result($query); >> >> $stmt ="select Total from monthsold"; >> $query = ibase_query($stmt) or die ("<script >> language='javaScript'>alert('" . ibase_errmsg() . "'); >> </script>"); >> $result = ibase_fetch_row($query); >> $TOTMONTH = $result[0]; >> ibase_free_result($query); >> >> $stmt = "select count(*) from deal where available = 1"; >> $query = ibase_query($stmt) or die ("<script >> language='javaScript'>alert('" . ibase_errmsg() . "'); >> </script>"); >> $result = ibase_fetch_row($query); >> $TOTAVAIL= $result[0]; >> ibase_free_result($query); >> >> ibase_commit(); >> ibase_close(); >> ?> Missed piece: $dbh = ibase_pconnect(BANCO,DBUSER,DBPASSWD) .... and $query=ibase_query($dbh,$stmt) or die .....

« previous php.db (#8307) next »