Hi, I am trying to write a small script to fetch a certain record (say record no. 25) from a mysql db.
I have written the following script after reading a Mysql book, but I am not able to understand as to how to fetch a given record no., or get records between a given range... like all records between 24th - 29th ..
A small part of the script...
#!/usr/bin/perl use DBI; use strict; my ($dsn)="DBI:mysql:test:localhost"; my ($dbh,$sth); my (@ary); my ($aaa); my ($bbb);
# Connect to databse $dbh = DBI-> connect ($dsn,{RaiseError=>1});
# Issue query $sth = $dbh -> prepare ("SELECT item1 from list1"); $sth-> execute();
$bbb = $sth->fetchrow; $aaa = $sth->fetchrow; print $bbb; print $aaa;
$sth-> finish (); $dbh-> disconnect (); exit (0);
Can someone please help me.... Thanks in advance.
Poonam
________________________________________________________________________ Want to sell your car? advertise on Yahoo Autos Classifieds. It's Free!! visit http://in.autos.yahoo.com