Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I'm trying to get some data from database using method fetchrow_array, but it seems one of the return variables is empty.
my $db=$database->prepare($query) or croak $db->errstr; $database->bind_param(':user',$user) or croak $db->errstr; $database->bind_param(':num',$num) or croak $db->errstr; $datbase->execute() or croak $db->errstr; ($user_type,$user_num)=$database->fetchrow_array();
After this, I do an if where i verify if either one of these variables is empty, and for some reason one of them is. But, if I connect to the database directly I get a result. Can someone help me with this? Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Fetchrow_array returns empty value
by davido (Cardinal) on Mar 24, 2014 at 16:21 UTC | |
by Anonymous Monk on Mar 24, 2014 at 17:34 UTC | |
|
Re: Fetchrow_array returns empty value
by GotToBTru (Prior) on Mar 24, 2014 at 14:29 UTC | |
by Anonymous Monk on Mar 24, 2014 at 14:40 UTC | |
by GotToBTru (Prior) on Mar 24, 2014 at 14:43 UTC | |
by Anonymous Monk on Mar 24, 2014 at 14:47 UTC | |
|
Re: Fetchrow_array returns empty value
by erix (Prior) on Mar 24, 2014 at 14:47 UTC | |
by Anonymous Monk on Mar 24, 2014 at 14:49 UTC | |
|
Re: Fetchrow_array returns empty value
by erix (Prior) on Mar 24, 2014 at 15:46 UTC | |
by Anonymous Monk on Mar 24, 2014 at 16:25 UTC |