You need to join your two tables.
Where uyebayiiler. bayiiid = bayiiler. bayiiad And bayiiler.sehir = 'ankara'; Pat www.gypsyfarm.com <http://www.gypsyfarm.com/> ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of onurdyh Sent: Monday, February 05, 2007 3:24 PM To: [email protected] Subject: [php_mysql] getting data from multiple query?? 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.. thanx a lot.. DyhOnur.. --------------------------------- Check out the all-new Yahoo! Mail beta - Fire up a more powerful email and get things done faster. [Non-text portions of this message have been removed] [Non-text portions of this message have been removed]
