php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: smweb at ihost dot de
New email:
PHP Version: OS:

 

 [1999-05-28 04:52 UTC] smweb at ihost dot de
Hi,

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, 'dd.mm.yyyy') xdatum, TO_CHAR(b.erstdatum, 'hh:mi') xzeit, b.vorname, b.nachname, b.strasse, b.plz, b.ort, b.telefon, b.email, 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.email, 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);
	OCIExecute($stmt);

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

	OCIFreeStatement($stmt);
	OCILogOff($conn);

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

Thanks,
- Steffen

Patches

Pull Requests

History

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-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 01:01:30 2024 UTC