Hi all
I am not sure how to do this with php.
I have two queries
i am writting while loopCode:$qry = "select * from product where productid='".$dlist."'"; $result=mysql_query($qry); $subprodqry = "select * from subproducts where productid='".$dlist."'"; $subprod=mysql_query($subprodqry);
within the while loop there is a point where i have to assign the values from 2nd array $subprods.Code:while($row = mysql_fetch_array($result) and $subprods = mysql_fetch_array($subprod)) { }
But the thing is while doing that i have three different records (product names), which i need to assign to 3 different product images. when i do that i get three different results
how can i do that do have to write another while loop for assigning the values. I am giving the code where i have to write it....
i want to put the sub product name from the $subprods array ,every image has its name so it will be assigned uniquely....how can i do that....same after the image is displayed and below that is the product code same way while loop and every product has product code which need to be displayed.Code:<td align="left" valign="middle" bgcolor="#4E8EB4" >'; echo " Product Name :-- '". $subprods["subPartName"]."'</td>"; echo ' <td rowspan="4" valign="top" bgcolor="#FFFFCC" ><!--DWLayoutEmptyCell--> </td> <td align="left" valign="middle" bgcolor="#4E8EB4" >'; echo " Product Name :--'". $subprods["subPartName"]."'<!--DWLayoutEmptyCell--> </td>"; echo ' <td rowspan="4" valign="top" bgcolor="#FFFFCC" ><!--DWLayoutEmptyCell--> </td> <td align="left" valign="middle" bgcolor="#333333" >'; echo " Product Name :-->'". $subprods["subPartName"]."'<!--DWLayoutEmptyCell--> </td>"; echo ' <td >
Thanks in Advance....
Help need is urgent...for my customer web site..



Reply With Quote

Bookmarks