in reply to Re: creating a SQL statement from an array
in thread creating a SQL statement from an array

so if the original SQL statement is:

SELECT junk.name, st.site_type, junk.location, junk.mapref
FROM junksite junk, site_type st
WHERE junk.site_type_id = st.id

the arrays would map as follows

name -> 0<br> site_type -> 1<br> location -> 2<br> mapref -> 3<br>
so from there you can write
$array_ref = $sth->fetchall_arrayref( [0, 2] );