in reply to Re^6: sql join with multiple select
in thread sql join with multiple select
If your user table is this
TABLE users userid FNAME LNAME 1 JOHN DEO 2 JANE DEO
this line
my $data = $DBH->prepare("SELECT SND.userid, SND.firstname, SND.lastname
give the error
DBD::mysql::st execute failed: Unknown column 'SND.firstname' in 'field list'
If I correct that error, the next error is
Not an ARRAY referenceat this line
foreach $row ( @$data) {
because as I told you here $data is a statement handle not an array refence
I don't know what code you have that is working but it's not what you posted.
poj
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: sql join with multiple select
by bigup401 (Pilgrim) on Oct 04, 2018 at 15:27 UTC | |
by AnomalousMonk (Archbishop) on Oct 04, 2018 at 17:01 UTC |