php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12052 BUG #12006
Submitted: 2001-07-11 10:04 UTC Modified: 2002-04-13 14:56 UTC
From: rk_hora at yahoo dot com Assigned:
Status: Closed Package: InterBase related
PHP Version: 4.0.6 OS: winme
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
46 + 9 = ?
Subscribe to this entry?

 
 [2001-07-11 10:04 UTC] rk_hora at yahoo dot com
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-13 14:56 UTC] daniela@php.net
The version of PHP that this bug was reported in is too old. 
Please try the php-4.2.0RC3 from http://www.php.net/~derick/ 

If you are still able to reproduce the bug, please change the PHP
version on this bug report to the version you tested and change 
the status back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 16 08:01:29 2024 UTC