[PHP-DB] ibase_fetch_* => "request sync. error"

2003-12-16 Thread DiZEM PGC
Hi !
Habe folgendes Problem :

Jeder Aufruf der Funktion ibase_fetch_assoc() resultiert in dem Fehler
"Request Synchronization Error".
Ich habe es auch schon mit der anderen Variante ibase_fetch_object()
probiert. Die lieferte die gleiche Fehlermeldung. Die Skripte laufen lokal auf einem
APACHE HTTP SERVER 2.0.47 mit PHP 4.2.3 als CGI-Exe. Dabei sind meine ganzen
Datenbankzugriffe in einer Klasse(Datei) gekapselt. Darunter fällt natürlich
auch ibase_fetch_assoc(), welche in der Methode db_fetchassoc() gekapselt
ist. Hier ist der relevante Ausschnitt der Funktion:

// Der Datenbanktyp wird zu Beginn jedes Skriptes gesetzt und ist
benutzerabhängig
$this->db_dbtyp=ibase;
...

function db_fetchassoc()
{
  switch($this->db_dbtyp)
  {
case 'ibase':

if (!$this->db_qry_result)
{
  $this->db_errormessage="Das Resultset ist leer!";
  //$this->db_errornumber=0;
  return 0;
}
else
{
  $this->db_errormessage="";
  $r=ibase_fetch_assoc($this->db_qry_result);  // ibase_fetch_object()
  return $r;
}
break;

//case 'dbase':
//
//break;
...

$this->db_qry_result beinhaltet nach Ausführung von db_query($sql_s) das
Resultset der SQL-Anfrage $sql_s :
...
function db_query()
{
  if (!$this->db_qry_result=ibase_query($sql_s) )  
  {
 // Fehlermeldung generieren/speichern
  }
  else
  {
// $this->db_qry_result ist gesetzt.
  }
}

Also sollte doch z.B. $row=ibase_fetch_assoc($this->db_qry_result) ein
assoziatives Array an $row zurückliefern. Und dementsprechend würde
$row['BEZEICHNUNG'] den Inhalt der Tabellenspalte BEZEICHNUNG liefern, sofern diese
existiert, oder ? 

P.S.:
Fehlende bzw. nicht vorhandene Datensätze kann ich bei der SQL-Anfrage
ausschließen, da $sql_s bei Ausführung in der IB_Console (Interbase-Client) genau
die eine Zeile liefert, die ich erwartet hätte.

Weiss irgendeiner vielleicht, was dieser Fehler bedeuten könnte ? 
Bitte um Hilfe !

MfG,
DiZEM

-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] ...request synchronization error...

2003-12-17 Thread DiZEM PGC
Hi ,

Does anyone know what could be the reason for an 'request synchronization
error' ?
It occurs after calling ibase_fetch_assoc(). The same thing going on with
ibase_fetch_object() and ibase_fetch_row(). The resultset is being delivered
correctly by ibase_query(). The SQL-String (SELECT) returns the one row i've
expected when executing it inside IBConsole.
I've written a class containing all database functions, e.g.
'db_fetchassoc()'. 
Now, the strange thing about this is: 
-Calling the ibase functions directly works fine and returns the expected
row ( same as IBConsole).
-Calling the ibase functions from another script, that includes my database
functions(class), results in the error mentioned above.

MY
SCRIPT
--
...
include('databasefunctions.php');
...
$database=new database;
$sql='SELECT ID,NAME,SIZE';
$database->db_query($sql);  // equals ibase_query($sql)

$databaserow=$database->db_fetchassoc(); <- At this line I get the error
!!!

...
echo
$databaserow[...]
...
--

And this is how the function inside the class looks like :

function db_fetchassoc()
{
...  
  // ibase_fetch_row() or
  // ibase_fetch_object() or
  $resultset=ibase_fetch_assoc(); 
  return $resultset;
}

Does anyone know how to solve this problem ?
Please help me !
P.S.: Let me know if further information is needed.

DiZEM

-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] PHP crashes...

2004-01-21 Thread DiZEM PGC
I have a script called 'login.php' which worked fine until now.
Last dayz i've made a few changes at this script which ones just dealt with
if-expressions.
I've set some vars to values returned by functions and checked (if) these
values afterwards.

Now the execution of this script results in a php crash. Directly after 
return
So I've put some echo commands into the script, but noone is being printed
on screen.
The problem only occurs with this script, others work without
problems/errors.

My configuration:
APACHE V. 1.3.29
PHP V. 4.2.3
MYSQL V. 4.0.16 (Max)

Please help me! 

Peter


 


-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Bis 31.1.: TopMail + Digicam für nur 29 EUR http://www.gmx.net/topmail

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] PHP crashes...

2004-01-22 Thread DiZEM PGC
Here is the source until something is returned by the first function call
(first from top to bottom):

set_file("fi_login","./Tpl/login.tpl.html");
$tpl->set_var(array(
"seitentitel" => "PAGETITLE",
"farbe" => "blue",
"meldungen" => ""
));
ob_start();

if ($_POST['cmd_fislogin'])   // $cmd_fislogin is the only button in
loginscript
{
  if (($_POST['fis_benutzername']!="") and ($_POST['fis_passwort']!=""))  //
Textfields: user & password 
  {
// Create DB-Connection
$dbc = new db_con;

// $con_ret is TRUE if DB-Connection could be established. 
   
$con_ret=$dbc->db_login($db_typ,$db_pfad,$db_name,$db_user,$db_passwort);

// if the DB-Connection couldn't be established: echo an error. 
if ($con_ret!=1) { echo 'No DB-Con'.$dbc->db_errormessage; }
.
.
.


-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Bis 31.1.: TopMail + Digicam für nur 29 EUR http://www.gmx.net/topmail

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] mysql_connect problem

2004-02-02 Thread DiZEM PGC
I try connecting to an existing mysql DB. The first time I directly called
mysql_connect with all required
params (Path/Database,User,Password) and established a connection without
problems.
Second time I have used a script that includes a self-written class
containing a few Database functions.
One of these functions, named 'db_login', does exactly the same as
mysql_connect (w. the same params). First case (directly calling) works fine. The
second case doesn't report any error and doesn't establish a connection. 
What could be the reason for this strange behavior ?
DiZEM


-- 
GMX ProMail (250 MB Mailbox, 50 FreeSMS, Virenschutz, 2,99 EUR/Monat...)
jetzt 3 Monate GRATIS + 3x DER SPIEGEL +++ http://www.gmx.net/derspiegel +++

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Interbase: How to get table structure via SQL ?

2004-02-18 Thread DiZEM PGC
Hi,

does anyone know how to get the Structure of a table using SQL.
(ex.: SELECT ?RELATION_SOURCE?, RDB$RELATION_NAME FROM RDB$RELATIONS)

Isn't there any table containing the CREATE STATEMENT for a table?
Maybe I have to use another command?
Please help !

Thx,
DiZEM

-- 
GMX ProMail (250 MB Mailbox, 50 FreeSMS, Virenschutz, 2,99 EUR/Monat...)
jetzt 3 Monate GRATIS + 3x DER SPIEGEL +++ http://www.gmx.net/derspiegel +++

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Interbase: How to get table structure via SQL ?

2004-02-18 Thread DiZEM PGC
Hi,

...table structure without PEAR ?

Is it possible to accomplish this by a sql-statement or do I really HAVE TO
install this xtension (PEAR) ?
Cuz I've already written a few scripts containing many function calls (self
written classes, too). I read the PEAR extension organizes everything with
packages. So, if I install PEAR, do I have to change all my function calls?
I'd like to find a more 'simple' solution for my problem.

(P.S.: Thx to R.Hutchins 4 answering quickly!)

Bye,
DiZEM  

 

-- 
GMX ProMail (250 MB Mailbox, 50 FreeSMS, Virenschutz, 2,99 EUR/Monat...)
jetzt 3 Monate GRATIS + 3x DER SPIEGEL +++ http://www.gmx.net/derspiegel +++

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php