For each'de hatayı bulamadım

3 views
Skip to first unread message

ibrahim Güneş

unread,
Apr 13, 2011, 11:17:48 AM4/13/11
to <?PHP echo "Merhaba Türkiye"; ?>
$query = mysql_query("SELECT a.cust_id,a.food_id,c.username as
cust_name,c.address1 as cust_add,b.name as food_name FROM orders a,
foods b, customers c WHERE a.food_id = b.food_id AND a.cust_id =
c.cust_id",$connect);

foreach ($query as $row)
{
print "<tr> ";
print "asa: ".mysql_result($row,0,food_name) ;
print "<td>".$row['cust_name']."</td>";
print "</tr>";
}


Merhaba bir sorum olacaktı.. For each içinde dizideki elemanları nasıl
yazdıracağım. Yardımcı olabilirmisiniz??


Teşekkürler

Emre Erkan

unread,
Apr 13, 2011, 3:18:08 PM4/13/11
to tr_...@googlegroups.com, ibrahim Güneş
Benzer bir örneğe şuradan ulaşabilirsiniz:
http://www.w3schools.com/PHP/php_mysql_select.asp

2011/4/13 ibrahim Güneş <gne...@gmail.com>:

> --
> Bu mesajı  "<?PHP echo "Merhaba Türkiye"; ?>" grubuna üye olduğunuz için aldınız.
> Gruba mesaj göndermek için tr_...@googlegroups.com adresini kullanın
> Gruptan ayrılmak için tr_php-un...@googlegroups.com adresine boş bir e-posta gönderin
> Grup ile ilgili daha çok işlem yapabilmek için http://groups-beta.google.com/group/tr_php?hl=tr adresiniz ziyaret edin.

Reply all
Reply to author
Forward
0 new messages