|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-04-13 14:56 UTC] daniela@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 13:00:01 2025 UTC |
BUG id #12006 Dear Derick /* Table: LOTTERY, Owner: SYSDBA */ CREATE TABLE "LOTTERY" ( "INSTALL1" DATE NOT NULL, "RATE1" NUMERIC(9, 2), "INSTALL2" DATE, "RATE2" NUMERIC(9, 2), "TOTAL" COMPUTED BY (rate1 + rate2), CONSTRAINT "pkLOTTERY" PRIMARY KEY ("INSTALL1") ); The above is my table structure. the following is my php code that produce previous mentioned bug. ibase_timefmt("%d/%m/%Y", IBASE_DATE); $db = ibase_pconnect('c:/mydb.gdb', 'SYSDBA', 'masterkey'); $query = "select * from lot"; $result = ibase_query($db, $query ); $sum = 0; $rowcount = 0; print "<h1><center>Lottery</center></h2>"; print "<table border>"; print "<tr><th>DATE01</th><th>TOTAL1</th><th>DATE16</th><th>TOTAL2</th><th>TOTALSUM</th></tr>"; while( $row = ibase_fetch_row( $result )){ $s = sprintf( "<tr><td>$row[0]</td><td align = right>%s</td><td>$row[2]</td><td align = right>%s</td><td align = right>%s</td></tr>", number_format($row[1], 2),number_format($row[3], 2), number_format($row[4], 2)); print $s; $sum += $row[4]; $rowcount++; } ibase_free_result($result); ibase_commit(); ibase_close($db); sorry for any incoutesy I'm very novice for responding by this system.