Re: loading data from database

From: Date: Sun, 10 Apr 2005 19:05:32 +0000
Subject: Re: loading data from database
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-212765@lists.php.net to get a copy of this message
You probably mean to make a joined query: Select * from table1 inner join table2 on table1.name = table2.name where movies = yes Notice that the join clause has a few options, the most important you might have to consider is the 'left join' or 'right join' which allows you to still see the records of one table even if there is no corresponding record on the other table. Satyam "Micha Biegnolé" <michabig@tiscali.nl> wrote in message news:20050410140651.30275.qmail@lists.php.net... > Hi, I am a student of multimedia design. > > I have two tables in a database with one same column(column:Name). > I ask data from table1 collumn:Name. In table2 I want to use the return of > data from table1 and search table2 collumn:Name for other information. I > tried joined SELECT, but it didn't work with me. > > I hope someone understands what I mean, my english is not so great. > > select data from table1. > SELECT name FROM table1 WHERE movies='yes' > > Then I want to select from table2 using the result of select from table1. > > SELECT * WHERE..? > > Thank you!

« previous php.general (#212765) next »