Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old October 24th, 2006, 12:48 PM
Registered User
Join Date: Oct 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default bind recordset to field

i need to know how to get sum of field named $amount?
Please help..

below is some of the sql query:

$query = "select policynum, CONVERT(varchar(10), ar.addDate, 101) AS TransDAte,


from ar, policy

where DATEDIFF(day,ar.adddate,('$_POST[start_date]')) <= 0

and DATEDIFF(day,ar.adddate,('$_POST[end_date]')) >= 0

and ar.policyid = policy.policyid

and artype = 25

order by policynum


//execute the SQL statement and return records
$rs = $conn->execute($query);
$policynumber = $rs->Fields(0);
$transdate = $rs->Fields(1);
$amount = $rs->Fields(2);
$sumamount = $rs->Fields(3);

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to bind Recordset to an Access Subform in VB? fcortes BOOK: Access 2003 VBA Programmer's Reference 1 March 1st, 2008 08:39 PM
Bind datagrid to recordset MAntis_sg Classic ASP Databases 0 May 15th, 2006 07:31 AM
How to bind data from a recordset to a combobox? wayne62682 Access VBA 6 April 2nd, 2006 08:45 PM
How to bind unbound field ? cjordan BOOK: Professional Crystal Reports for VS.NET 1 January 23rd, 2004 01:34 PM
How to bind text box to recordset fields? cici VB How-To 2 December 1st, 2003 02:10 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.