Given your query, you would access it like:

$avgField = $avg->fields['avg(fieldname)'];

You can also change your query to use an alias like:
"select avg(fieldname) as theAvg from tablename"

HTH,
Scott


-----Original Message-----
From: bobbie bob [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 9:12 AM
To: [EMAIL PROTECTED]
Subject: adodb


Hi 
i'm using adodb in my code to connect to mysql.Its
workingfine for the queries which get the values from
DB.

1) But When i use the Query 
$avg=$conn->Execute("select avg(fieldname) from
tabname 
& then i say
 print $avg
 it prints ""OBJECT""
when i try   print $avg->fields[fieldname]
it doesn't print anything.
what shall i do?
how do i print the value of avg in my php code.

2)$duration=$conn->Execute("select
sum(UnixTimeStamp(F1) - UnixTimeStamp(F2)) from
tabname 
 print $duration doesn't print anything
how do i print the result?

plz help me.Mail to [EMAIL PROTECTED]
Thanks
prasad

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to