extention from this thread .. but that one is resolved
not sure if i should do with with a linking query or weather there is another way to do it..
here is the result i'm after pulling data from 2 different tables to form a single array
as in the first problem i has hers the data out but i want
array('id'=>'1','ptno'=>'111','Title'=>'sample title','Description'=>'description here')
but i have changed that slightly to combine title and description and then add a new line price
array('Image'=>"<C:showimage:../images/products/$ptno5.jpg 90>\n$ptno5", 'ptno'=>"<u>$title5</u>\n\n$fulldesc5", 'Description'=>"MSRP = $msrp6 \nPublic Price $public6 \n\n Your Price $account" );
here is the problem i'm running into
table one has all the product information
the $ptno5 $title5 $fulldesc5 but the pricing is dynamic to different classes of customer ie MSRP public price retail wholesale distribution and custom
these i can normally pull into the same area ie if i just want to display it
by closing the end echo "; doing the next query then opening the echo back up echo"
but in the array i'm not sure how to do this .
here is the code i'm trying
while ($r5 = mysql_fetch_array($result5)) {
$id5 = $r5["id"];
$ptno5 = $r5["ptno"];
$title5 = $r5["title"];
$fulldesc5 = $r5["fulldesc"];
$msrp6 = fopen("http://domain.com/folder/msrp.php?price=$ptno5", "r");
$data[] = array('Image'=>"<C:showimage:../images/products/$ptno5.jpg 90>\n$ptno5", 'ptno'=>"<u>$title5</u>\n\n$fulldesc5", 'Description'=>"MSRP = $msrp6 \nPublic Price ???.?? \n\n Your Price ???.??" );
as you see this is another hack .. basically using a separate document to get me the data for msrp i want
here is the code for the msrp.php
<?
$price=$_REQUEST['price'];
if (price == "")
{
echo "???.??";
}
else
{
include ('../include/database/config.php');
include ('../include/database/opendb.php');
$sql6 = "SELECT `pricing`.`price` FROM `pricing` WHERE `account` = \"MSRP\" AND `ptno` = \"$price\" ";
$result6 = mysql_query($sql6) or die('Query 6 failed. ' . mysql_error());
while ($r6 = mysql_fetch_array($result6)) {
$price6=$r6['price'];
echo"$price";
}
}
?>
now i'm at yet another stand-still and thinking of giving up on this dynamic pdf price list its annoying that is small stuff that's tripping my up the hard parts that i was dreading were relativity easy 🙂