skosterow11
IS-IT--Management
Heya guys and gals -
i search the archives and cant find exactly what im looking for - if this is a repost - 1st i applogize and if you could send me down the right path would be much apprishiated!
Im looking to get data from 2 tables based on a where clause from 2 tables:
my $sth = $dbh->prepare(qq{ SELECT db_student.id, db_student.firstname, db_student.lastname, db_student_classes.gpa AS GPA, db_student_classes.attendance AS ATTENDANCE FROM db_student WHERE db_student_classes.customer_id = '$CUSTOMER::ID' AND db_student_classes.class_id = '$CLASS::ID' ORDER BY db_student.lastname });
NO THIS IS NOT A SCHOOL project - working on some testing software for my company.
Its failing saying it cant find db_student_classes. But the TABLE IS THERE in MySQL.
DBD::mysql::st execute failed: Unknown table 'db_student_classes' in field list at C:\Documents and Settings\skosterow\Desktop\Web\testanything.net\customers\classes\view.pl line 133.
DBD::mysql::st fetchrow_array failed: fetch() without execute() at C:\Documents and Settings\skosterow\Desktop\Web\testanything.net\customers\classes\view.pl line 134.
ANY help wold be appreshiated thanks in advance!
(Please dont post the answer - or ill never learn anything - if you know of a good tutorial - or document - i'd appreshiate that even more)
i search the archives and cant find exactly what im looking for - if this is a repost - 1st i applogize and if you could send me down the right path would be much apprishiated!
Im looking to get data from 2 tables based on a where clause from 2 tables:
my $sth = $dbh->prepare(qq{ SELECT db_student.id, db_student.firstname, db_student.lastname, db_student_classes.gpa AS GPA, db_student_classes.attendance AS ATTENDANCE FROM db_student WHERE db_student_classes.customer_id = '$CUSTOMER::ID' AND db_student_classes.class_id = '$CLASS::ID' ORDER BY db_student.lastname });
NO THIS IS NOT A SCHOOL project - working on some testing software for my company.
Its failing saying it cant find db_student_classes. But the TABLE IS THERE in MySQL.
DBD::mysql::st execute failed: Unknown table 'db_student_classes' in field list at C:\Documents and Settings\skosterow\Desktop\Web\testanything.net\customers\classes\view.pl line 133.
DBD::mysql::st fetchrow_array failed: fetch() without execute() at C:\Documents and Settings\skosterow\Desktop\Web\testanything.net\customers\classes\view.pl line 134.
ANY help wold be appreshiated thanks in advance!
(Please dont post the answer - or ill never learn anything - if you know of a good tutorial - or document - i'd appreshiate that even more)