|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-05-29 11:45 UTC] thies at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 01:00:02 2025 UTC |
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