Subject InterBase and PHP
Author Bernhard Doebler
Hi,

I have some tables which are connected via foreign keys (at least somehow).
The Query looks like so:
SELECT DISTINCT inhalt.Bezeichnung AS bez1, body.bezeichnung AS bez2
FROM Feldinhalt, namen, inhalt, body WHERE
namen.GID=1 AND
Feldinhalt.maschine=namen.nummer AND
inhalt.InhaltsID=feldinhalt.inhalt AND
body.datenwortid=feldinhalt.body
ORDER BY body

It looks for all entries in table namen where GID=1 that are listed in table Feldinhalt. The problem is I'm not interested in the content of the tables name or feldinhalt but in the content of the tables inhalt and body.

Surely, it's strange but when I enter this query in the InteractiveSQL-Window of the IBConsole I get an acceptable result. When I query using PHP I get an error from the operating system (WinNT, IIS). It somehow tries to access a false memory address and crashes. It interestingly only happens with this query. (I luckyly only noticed it with this query)

Has someone experienced something like this?

I wonder why to reformulate the query if it works in the console window? (btw. how to reformulate?)

Best regards
Bernhard