MySQL Forums
Forum List  »  Perl

Trouble with selectrow_arrayref method:
Posted by: Adam Shapira
Date: January 09, 2007 06:15PM

I make the call in my PERL programs:

@lc_ret = $dbsock->selectrow_arrayref("select orgid, orgnom, orgurl from cal_organizations");

and the result is that I am given an array that only points to one record, even though I know that there are two records in the database that match this query.

And just to be certain that the problem is with my PERL and not with my SQL code, I went to MySQL's text-terminal console program and typed the query and got the following result:


mysql> select orgid, orgnom, orgurl from cal_organizations;
+-------+--------------+------------------------+
| orgid | orgnom | orgurl |
+-------+--------------+------------------------+
| 1 | TICSs | http://techno-info.com |
| 2 | Virtual Stoa | http://virtualstoa.org |
+-------+--------------+------------------------+
2 rows in set (0.00 sec)

mysql>


So can anyone tll me what am I doing wrong? Why is selectrow_arrayref giving back only one record when there should be two?

Options: ReplyQuote


Subject
Written By
Posted
Trouble with selectrow_arrayref method:
January 09, 2007 06:15PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.