Re: Searching a MYSQL database

2001-07-21 Thread Ackim Chisha
. Kregards, Ackim. .--- Original Message - From: Peter Hanson <[EMAIL PROTECTED]> To: Ackim Chisha <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, July 16, 2001 11:56 AM Subject: RE: Searching a MYSQL database > Try this: > > #!/usr/bin/perl -w > > us

Re: Searching a MYSQL database

2001-07-16 Thread Ackim Chisha
Peter, Thanks I seem to be making some progress. - Original Message - From: Peter Hanson <[EMAIL PROTECTED]> To: Ackim Chisha <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, July 16, 2001 11:56 AM Subject: RE: Searching a MYSQL database > Try this: > >

Re: Searching a MYSQL database

2001-07-16 Thread Ackim Chisha
Thanks Jos, Your link is helpful and a good starter. - Original Message - From: Jos I. Boumans <[EMAIL PROTECTED]> To: Ackim Chisha <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, July 16, 2001 11:36 AM Subject: Re: Searching a MYSQL database > Sure, you c

RE: Searching a MYSQL database

2001-07-16 Thread Peter Hanson
Try this: #!/usr/bin/perl -w use strict; use DBI; my $user = 'bob'; my $dbh = DBI->connect('DBI:mysql:database=foo;host=55.55.55.55', 'test', 'test',); my $cursor = $dbh->prepare("Select user from foo where exp = curdate\(\) and user = '$user'"

Re: Searching a MYSQL database

2001-07-16 Thread Ondrej Par
Yes, it's possible. What you need is to install Perl database modules (DBI) and Perl driver for MySQL (DBD::MySQL). Maybe your distribution of perl already contains these. Then, you can connect to the database and do whatever you need to. I'd recommend you to read the documentation for DBI (wr

Re: Searching a MYSQL database

2001-07-16 Thread Jos I. Boumans
Sure, you can connect to a mysql database using the DBI module, available from cpan.org you'll also need to install the dbd driver (DBD::Mysql). Then you can query your data just like you would at a mysql prompt the documentation is quite extensive, and here's an article that should get you start