Bug #1463: Error 'Document contains no data.' occurs.
| From: | smweb at ihost dot de | Date: | Fri, 28 May 1999 08:52:45 +0000 |
| Subject: | Bug #1463: Error 'Document contains no data.' occurs. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-6126@lists.php.net to get a copy of this message | ||
From: smweb@ihost.de
Operating system: Linux
PHP version: 3.0.7
PHP Bug Type: Oracle related
Bug description: Error 'Document contains no data.' occurs.
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
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net