php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25999 I can convert the following code from asp to php
Submitted: 2003-10-27 04:51 UTC Modified: 2003-10-27 05:27 UTC
From: yunlan at mail dot eestart dot com Assigned:
Status: Not a bug Package: COM related
PHP Version: 4.3.4RC2 OS: Microsoft window server 2003
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: yunlan at mail dot eestart dot com
New email:
PHP Version: OS:

 

 [2003-10-27 04:51 UTC] yunlan at mail dot eestart dot com
Description:
------------
ASP code:

<%
Set RS = Server.CreateObject("visualphd.data")
RS.HOSTNAME="APP22"
RS.TAGS.ADD "TIC1101.PV"
RS.SAMPLEFREQUENCY = 60
RS.SAMPLEMETHOD="SNAPSHOT"
RS.STARTTIME="NOW"
RS.ENDTIME="NOW"
RS.FETCH
response.write(rs.tags("TIC1101.PV").VALUE)
response.write("<br>")
response.write(rs.tags("TIC1101.PV").timestamp)
response.write("<br>")
response.write(rs.tags("TIC1101.PV").CONFIDENCE)
%>

Reproduce code:
---------------
I had Converted to php code:
<?
$obj = new COM("VisualPHD.Data");
$obj->HOSTNAME="APP22";
$obj->TAGS->ADD("TIC1101.PV");
$obj->SAMPLEFREQUENCY = 60;
$obj->SAMPLEMETHOD="SNAPSHOT";
$obj->STARTTIME="NOW";
$obj->ENDTIME="NOW";
$obj->MoveFirst;
$obj->FETCH;
print_r($obj->TAGS["TIC1101.PV"]->VALUE);
print_r("<br>");
print_r($obj->TAGS["TIC1101.PV"]->timestamp);
print_r("<br>");
print_r($obj->TAGS["TIC1101.PV"]->CONFIDENCE);
$obj=null;
?>
I don't know it is right that from "RS.TAGS.ADD \"TIC1101.PV\"" to "$obj->TAGS->ADD("TIC1101.PV");"?

Expected result:
----------------
Expected result is so such:

10.0
2003-10-27 17:40:50
100%

Actual result:
--------------
Actual result:

0
0
0

I hope you to help me.

yunlan@mail.eestart.com.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-27 05:27 UTC] alan_k@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

I suspect you want to call methods of the com object.
eg.
$com->FETCHNEXT();

likes like a great example of dumb syntax in ASP :)


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jan 07 20:01:29 2025 UTC