mnobrebr wrote:

Ok Csongor Fagyal, you're right !
For now I have DBD::mysql and DBD::Pg installed.

Viewing the man pages, it seems to me that the instructions concerns
to purely Perl or I am wrong ?

Where (site or tutorial) do I can find some sample code of Apache::ASP
with Perl (embeded or somewhat) working with DBI/DBD ?

Thanks In Advance.

Marcos Nobre.

Well...

You just use ASP and mix it with whatever Perl functionality you like.
But let me write an example for you...

x.asp :

<%
# Connect
my $dbh = DBI->connect("DBI:mysql:database=test;host=host:port", 'user', 'pass');

# Check error (or use eval + RaiseError)
if ($dbh->errstr) {
$Response->AppendToLog($dbh->errstr);
$Response->End;
}

# Fecth something from DB
my ($value) = $dbh->selectrow_array('SELECT field FROM table LIMIT 0,1', undef);

# You should have something in $value now
%>

<html>
<body>
Here is the result of your query: <%= $value %>
</body>
</html>


Got the point?

- Cs.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to