468,316 Members | 2,029 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,316 developers. It's quick & easy.

dbi

36
hi all

i am trying to retrive the data from the database by using the following code and printing.But it is reteriving one entry less from the database.could some throw light on this.
Expand|Select|Wrap|Line Numbers
  1. my $sth = $dbh->prepare($query);
  2.     $sth->execute;
  3.  
  4.     while(my $ref = $sth->fetchrow_hashref())
  5.     {
  6.         print "Found a row: name = $ref->{'employee'}, Model = $ref->{'model'},Mac = $ref->{'mac'}<br>";
  7.     }
  8.  
Thnaking you in advance
Jul 9 '08 #1
1 907
nithinpes
410 Expert 256MB
What is the query that you are passing? If you can post the string assigned to $query in your script, it would help to find out the cause.
Jul 9 '08 #2

Post your reply

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

Similar topics

3 posts views Thread by William C. White | last post: by
2 posts views Thread by Albert Ahtenberg | last post: by
3 posts views Thread by James | last post: by
reply views Thread by Ollivier Robert | last post: by
1 post views Thread by Richard Galli | last post: by
4 posts views Thread by Albert Ahtenberg | last post: by
1 post views Thread by inderjit S Gabrie | last post: by
2 posts views Thread by Jack | last post: by
3 posts views Thread by Sandwick | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.