|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1463 Error 'Document contains no data.' occurs.
Submitted: 1999-05-28 04:52 UTC Modified: 2006-07-17 08:49 UTC
From: smweb at ihost dot de Assigned:
Status: Closed Package: OCI8 related
PHP Version: 3.0.7 OS: Linux
Private report: No CVE-ID: None
 [1999-05-28 04:52 UTC] smweb at ihost dot de

thanks! PHP is really great, but I found a bug concerning Oracle 8:

When I go with this statement, everything works perfectly:

	$stmt = OCIParse($conn, "SELECT b.bestnr, TO_CHAR(b.erstdatum, '') xdatum, TO_CHAR(b.erstdatum, 'hh:mi') xzeit, b.vorname, b.nachname, b.strasse, b.plz, b.ort, b.telefon,, b.porto, b.zahlung, b.bezahlt, b.alterx, b.beruf, b.woher, b.ipadresse, SUM(p.preis) xpostsum, count(p.postnr) xpostcount FROM eshirt_bestellung b, eshirt_posten p WHERE b.bestnr = p.bestnr AND b.bezahlt = 1 GROUP BY b.bestnr, b.erstdatum, b.vorname, b.nachname, b.strasse, b.plz, b.ort, b.telefon,, b.porto, b.zahlung, b.bezahlt, b.alterx, b.beruf, b.woher, b.ipadresse ORDER BY b.bestnr");

When I change 'b.bezahlt = 1' (in the WHERE part) to 'bezahlt = 0', I get a message from the browser 'Document contains no data'. When I execute the exactly same statement in sqlplus, there's no probelem at all. Also, when I change it to 'bezahlt = 2', it works. Just 'bezahlt = 0' doesn't work.

bezahlt is a number value.

If you need my further code, here it is:

	OCIDefineByName($stmt,"BESTNR", &$bestnr);
	OCIDefineByName($stmt,"XDATUM", &$xdatum);
	OCIDefineByName($stmt,"XZEIT", &$xzeit);
	OCIDefineByName($stmt,"VORNAME", &$vorname);
	OCIDefineByName($stmt,"NACHNAME", &$nachname);
	OCIDefineByName($stmt,"STRASSE", &$strasse);
	OCIDefineByName($stmt,"PLZ", &$plz);
	OCIDefineByName($stmt,"ORT", &$ort);
	OCIDefineByName($stmt,"TELEFON", &$telefon);
	OCIDefineByName($stmt,"EMAIL", &$email);
	OCIDefineByName($stmt,"PORTO", &$porto);
	OCIDefineByName($stmt,"ZAHLUNG", &$zahlung);
	OCIDefineByName($stmt,"BEZAHLT", &$bezahlt);
	OCIDefineByName($stmt,"ALTERX", &$alterx);
	OCIDefineByName($stmt,"BERUF", &$beruf);
	OCIDefineByName($stmt,"WOHER", &$woher);
	OCIDefineByName($stmt,"XPOSTCOUNT", &$xpostcount);
	OCIDefineByName($stmt,"XPOSTSUM", &$xpostsum);
	OCIDefineByName($stmt,"IPADRESSE", &$ipadresse);

	$myLines = 0;	
	while (OCIFetch($stmt)) {
		$gesamt = $porto + $xpostsum;
	[... echo stuff ...]


Would be very nice if you would correct this in the next version, since I really like using PHP and Oracle.

- Steffen


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1999-05-29 11:45 UTC] thies at cvs dot php dot net
fixed in 3.0.8

was problem in ocidefinebyname
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon May 27 11:01:28 2019 UTC