dbi

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jain236
    New Member
    • Jul 2007
    • 36

    dbi

    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.
    Code:
    my $sth = $dbh->prepare($query);
    	$sth->execute;
    	
    	while(my $ref = $sth->fetchrow_hashref())
    	{
    		print "Found a row: name = $ref->{'employee'}, Model = $ref->{'model'},Mac = $ref->{'mac'}<br>";
    	}
    Thnaking you in advance
  • nithinpes
    Recognized Expert Contributor
    • Dec 2007
    • 410

    #2
    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.

    Comment

    Working...