Mailinglisten-Archive |
Hi,
ich habe folgendes Problem:
Ich möchte eine einfache Datenbankabfrage auf eine Informix
Datenbank ausführen. Dabei benutze ich das folgende Statement:
select * from termine where online='1' and (protokoll1<>'' or
protokoll2<>'' or protokoll3<>'')
Wenn ich dieses Statement direkt in dbaccess (Informix DB Editor)
ausführe, habe ich keine Probleme. Wenn ich
allerdings das Statement aus meinem PHP Code herausausführe
bekomme ich folgende Fehlermeldung:
Warning: Prepare fails (E [SQLSTATE=42 000 SQLCODE=-201]) in
/usr/local/vip/edit/********/WebSite/test.php on line 75
Warning: Supplied argument is not a valid Informix Result resource
in/usr/local/vip/edit/********/WebSite/test.php on line 76
Protokolle
Warning: Supplied argument is not a valid Informix Result resource
in /usr/local/vip/edit/********/WebSite/test.php on line 102
Folgenden Code benutze ich um das Statement auszuführen:
$server = "xxxxx";
$user = "xxxxx";
$pass = "xxxxx";
$conn_id= ifx_connect("$server", "$user", "$pass");
$sql="select * from termine where online='1' and (protokoll1<>''
or protokoll2<>'' or protokoll3<>'')";
$result = ifx_prepare ($sql, $conn_id);
ifx_do($result);
Wo liegt der Fehler?
Gruß
Jens
php::bar PHP Wiki - Listenarchive