By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,968 Members | 1,666 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,968 IT Pros & Developers. It's quick & easy.

problem in querry

archulu
P: 34
hai this archulu, i have a doubt in Mod perl programing with pgsql; plz help to me
in my project i am canducting exam to students, in exam result , 1=right anwer, 0=wrong answer.

$id=4;
$sth1=$dbh->prepare("select SUM(result) from result_master where exam_id = '$id' and result = '1' ") or warn "Erron in prepare statemt ".$dbh->errstr;
$res=$sth1->execute();
in this program result $res prints the value is 1 insted of actuall sum value(suppose 80 etc). plz help to me. what fault in quarry.
iam also using count insted of SUM. this same qurry working in database but not in program printing
thanks again
May 18 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.