In message <[EMAIL PROTECTED]>, onurdyh <[EMAIL PROTECTED]> writes >hi everybody; > > I have a small problem about multiple query on mysql, I have two tables as; > CREATE TABLE `bayiiler` (`bayiino` INT (10) NOT NULL >auto_increment, >`bayiiad` VARCHAR(50) default NULL, >`bayiikota` INT (10) default NULL, >`sehir` VARCHAR(20) default NULL, >`bolge` varchar(10) default NULL, >PRIMARY KEY(`bayiino`) > ) Engine=INNODB; >and > >Create table uyebayiiler ( bayiiid INT (10) UNIQUE NOT NULL >AUTO_INCREMENT, > ad VARCHAR (20), > soyad VARCHAR (20), >kullaniciadi VARCHAR (25), >sifre VARCHAR(10), >email VARCHAR (50), >gorus VARCHAR (100), >FOREIGN KEY (bayiiid) REFERENCES bayiiler (bayiiid) >) Engine=INNODB; >How can I take the values :a d, soyad,bayiiad,bayiino,sehir from those two >tables. >NOTE: > >select bayiiler.bayiiad, bayiiler.bayiino, bayiiler.sehir, uyebayiiler.ad, >uyebayiiler.soyad from bayiiler, uyebayiiler where bayiiler.sehir = 'ankara'; > > this query is NOT WORkING..
I would expect to see another section to the query. What is the connection between the tables? I would expect to see a field in uyebayiiler which would show the connection. Presumably table1 is places, and table2 is people, so there should be a numeric field in the people table which defines the place. then it would be where uyebayiiler.linkfield=bayiino AND bayiiler.sehir = 'ankara'; -- Pete Clark Sunny Andalucia http://www.hotcosta.com/comm_1.htm
