Home: Perl Programming Help: DBI:
Single resultset



thirdeyesol
New User

Jan 22, 2007, 8:49 PM


Views: 6118
Single resultset

Hi,

Can Someone tell me how do I write a single resultset program in perl from mysql.

For eg,

I would want to display this on a browser.

SELECT COUNT(DISTINCT results) FROM student;

This will give a number. I need to fetch this value and display it in the browser.

Thanks in advance.


davorg
Thaumaturge / Moderator

Jan 23, 2007, 8:04 AM


Views: 6115
Re: [thirdeyesol] Single resultset

What parts are you having trouble with?

1/ Connecting to the database
2/ Running the query
3/ Fetching the result
4/ Displaying the result

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks


thirdeyesol
New User

Jan 23, 2007, 6:22 PM


Views: 6110
Re: [davorg] Single resultset

It for fetching and displaying the result.

I don't have any problems displaying multiple resultsets.

Regards

Sriram


davorg
Thaumaturge / Moderator

Jan 24, 2007, 1:10 AM


Views: 6107
Re: [thirdeyesol] Single resultset

Perhaps you could show the code that you currently have. And explain what problems you are having.

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks