php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63628 PHP PARADOX CANNOT WRITE DATA
Submitted: 2012-11-27 15:28 UTC Modified: 2017-04-01 21:09 UTC
From: ozzybox at gmail dot com Assigned:
Status: Wont fix Package: Paradox (PECL)
PHP Version: Irrelevant OS: windows vista
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: ozzybox at gmail dot com
New email:
PHP Version: OS:

 

 [2012-11-27 15:28 UTC] ozzybox at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.px-insert-record#refsect1-function.px-insert-record-examples
---


Hello I can read data from paradox table, but I canĀ“t write.

 Call to undefined function px_insert_record() in C:\xampp\htdocs\teste\021.php on line 17


Test script:
---------------
<?php
$px = px_new();
$fp = fopen("test.db", "w+");
px_create_fp($px, $fp, array(array("timestamp", "@"), array("time", "T"), array("date", "D")));

$curdate = getdate();
$jd = gregoriantojd($curdate["mon"], $curdate["mday"], $curdate["year"]);
$days = $jd - 1721425; /* Number of days between 1.1.4714 b.c. and 1.1.0000 */
$secs = $curdate["hours"]*3600 + $curdate["minutes"]*60 + $curdate["seconds"];
px_put_record($px, array($days*86400000.0 + $secs*1000.0, $secs*1000.0, $days));

$curtimestamp = microtime(true);
$days = (int) ($curtimestamp/86400);
$secs = $curtimestamp - ($days * 86400.0);
$days += 2440588; /* Number of days between 1.1.4714 b.c. and 1.1.1970 */
$days -= 1721425; /* Number of days between 1.1.4714 b.c. and 1.1.0000 */
px_insert_record($px, array($days*86400000.0 + $secs*1000.0, $secs*1000.0, $days));
for($i=0; $i<2; $i++) {
    $rec = px_retrieve_record($px, $i);
    echo px_timestamp2string($px, $rec["timestamp"], "n/d/Y H:i:s")."\n";
    echo px_date2string($px, $rec["date"], "n/d/Y")."\n";
}
px_close($px);
px_delete($px);
?> 



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-01 21:09 UTC] tpunt@php.net
-Status: Open +Status: Wont fix
 [2017-04-01 21:09 UTC] tpunt@php.net
Due to this extension not seeing any activity since 2007, this issue will not be fixed. We are therefore closing this now.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 27 16:01:27 2024 UTC