my $data = $DBH->prepare("SELECT SND.userid, SND.fname, SND.lname FROM msg as M JOIN users as SND ON SND.userid = M.msg_from WHERE M.msg_to = ? AND M.received iS NULL");
but my problem and question was after adding some column to table msg and printing them out. i get error that tells me cant find such data from db according to my script. that means cant locate any data in db
my problem is here wen i include other columns to be selected. the statement dies and cant print anything just getting error nothing to print from db
my $data = $DBH->prepare("SELECT SND.userid, SND.fname, SND.lname, SND.city, SND.age, SND.city
FROM msg as M
JOIN users as SND
ON SND.userid = M.msg_from
WHERE M.msg_to = ?
AND M.received iS NULL");