Reply to Join

Your name:

Reply:


Posted by Pankaj on 12/08/06 13:41

Hi

I have three tables

media (media_id, type_id)
product_media (product_id, media_id)
and
product (product_name, product_id)

I am using the following join query

$sql="SELECT m.*, pm.*, p.* from edx_media as m LEFT OUTER JOIN
edx_product_media as pm on m.media_id=pm.media_id INNER JOIN
edx_product as p on pm.product_id=p.product_id where m.media_id=1405" ;

$product_listing_result=mysql_query($product_listing_sql, $sess->db) or
die("Error " . mysql_error() );
$product_options="";
$no_of_rows=mysql_num_rows($product_listing_result);

while($product_listing_result_row=mysql_fetch_array($product_listing_result))
{
$product_options .= "<option
value=$product_listing_result_row[0]>$product_listing_result_row[0] -
$product_listing_result_row[1] </option>";
}



However, this does not give the desired result. I want to get the
values of fields in the product table . Can someone tell me what I am
doing wrong

TIA
Pankaj

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация