Re: asp to php

From: Date: Tue, 09 Oct 2001 18:38:31 +0000
Subject: Re: asp to php
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-13151@lists.php.net to get a copy of this message
FYI: Have you seen this page? http://asp2php.naken.cc/ on 10/09/2001 2:39 PM, Harpreet at harpreet@crispincorp.com wrote: > I have an asp page and am trying to convert my asp code to php. > > my asp code is as follows: > <% ' Check for message alerts for Traffic Area > sqlstr = "SELECT COUNT(*) TOTAL FROM MSG_OPERATOR_TBL WHERE PRIORITY >= > 1000 AND READ_FLAG = 'N' AND TYPE = 'TR'" > if Session("ObjectRecordset").State = 1 then > Session("ObjectRecordset").Close > Session("ObjectRecordset").Open sqlstr, Session("ObjectConnection") > total1 = Session("ObjectRecordset")("TOTAL") > Session("ObjectRecordset").Close > %> > The php code so far is: > > <?php > // Check for message alerts for Traffic Area > $StrConnectionUser=mysql_connect("ip address","$USER"); > mysql_select_db(databasename, $StrConnectionUser); > $sqlstr="SELECT COUNT(*) TOTAL FROM MSG_OPERATOR_TBL WHERE PRIORITY >= 1000 > AND READ_FLAG = 'N' AND TYPE = 'TR'"; > $result=mysql_query($sqlstr); > ?> > > How do i get the value of TOTAL from the above query. > > Please help, > Regards, > Harpreet Kaur > Software Developer > Crispin Corporations Inc. > > ------------------------------------------------------------------------ Christopher Graham cjgraham@tachegroup.com PGP Fingerprint: F765 CCB5 B9CF 1285 7E3E 8CB0 0B1B 8454 9D66 D411

« previous php.db (#13151) next »