Problems building SQL Query using JOIN to assign fields

From: Date: Wed, 09 Aug 2000 09:45:13 +0000
Subject: Problems building SQL Query using JOIN to assign fields
Groups: php.db 
Request: Send a blank email to php-db+get-1892@lists.php.net to get a copy of this message
Hi, as I read in this group, I think you're handling with bigger problems than mine. But maybe you can help. I want to join two tables in a query. A php skript displays the entrys of one table "Info". There's a field "intInfoArt" wich contains a number. This number is in the table "InfoArt". In this table the second field is the Text to the number. So my query should take all entries from "Info" and look for "intInfoArt" in the table "InfoArt" for the field ID and takes the Text to that ID (field "strTyp") and put it into the response data. i tried nearly every combination of SELECT... JOIN... ON...WHERE and looked it up in a MySQL book. But this case is not explained. I just got querys that work, but this one would be my bullet:-) It would be nice if there's someone who could help. Data: Table1: name: "Info" fields: ID, intInfoArt, datDatum,......... have to displayed all Table2: name: "InfoArt" fields: ID, strTyp connection: intInfoArt from Info and ID from InfoArt result: strTyp from InfoArt Thanks a lot for your help -- Martin Strojek __________________________________________________________________________ SOLUTIONWORKS MULTIMEDIA AKTIENGESELLSCHAFT Postfach 1422 24572 Bad Bramstedt Fon: +49 4192 897654 Fax: +49 4192 897655 strojek@solutionworks.de __________________________________________________________________________

« previous php.db (#1892) next »