Hi,
I am able to prepare a select query to an Ingress database requesting
multiple column values from 1 table where a column value matches a
variable value, ie,"my $sth->prepare("SELECT p.fname, p.lname, p.dob,
p.sex, p.idnum FROM emppid p WHERE p.idnum=$idnum"). This query works.
When I try to query multiple tables, eg...("SELECT p.fname, p.lname,
p.dob, e.ssn, e.race FROM emppid p, empinfo e WHERE p.idnum=$idnum AND
e.unitnum=p.unitnum") I get "SYNTAX error on 'AND' ", and various other
errors because I have tried to configure the WHERE part of the query
numerous times - and I should mention that I have used sql very little -
and I'm not sure if my sql syntax is off or if it's a DBI problem that
has something to do with multiple table queries. Any help on this would
be greatly appreciated. Also if anyone knows of any good, quick and
dirty, sql primers I would also like to know of those also.
Thanks in advance!