Thanks, Ondrej and Ian for the very useful information.
A quick followup contribution, now that I understand what's going on and what to
look for:
When querying and only returning one row (see the second part of my original
message), the following appear to be equivalent:
$prep_query="SELECT date
On Thu, 7 Jun 2001, Pete Emerson wrote:
> 1. $prep_query="SELECT school_name,path from student_data where
>student_id=$student_id";
> 2. $query=$dbh->prepare($prep_query);
> 3. $query->execute;
> 4. $temp=$query->fetchall_arrayref();
> 5. foreach my $row (@$temp) {
> 6. ($school,$path)=@$row;
>
On Thursday 07 June 2001 16:15, Pete Emerson wrote:
> I have some questions about the following code snippet (using DBI to
> connect to MySQL):
>
> 1. $prep_query="SELECT school_name,path from student_data where
> student_id=$student_id";
> 2. $query=$dbh->prepare($prep_query);
> 3. $query->execut
I have some questions about the following code snippet (using DBI to
connect to MySQL):
1. $prep_query="SELECT school_name,path from student_data where
student_id=$student_id";
2. $query=$dbh->prepare($prep_query);
3. $query->execute;
4. $temp=$query->fetchall_arrayref();
5. foreach my $row (@$te