?

Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help


C# Help

?
?blank field after selection
Author:??(---.si.rr.com)
Date:???01-09-04 22:47

field $CategoryDescription
show at stmt 234 but is blank at stmt 330.

include('includes/header.php');
include('includes/fleamarket.php');

fleamarket_connect ()
or exit;


$ProdIDkey = script_param("ProdIDkey");
$CategoryKey = script_param("CategoryKey");
$reccount = script_param("recCount");
$count = script_param("Count");
$cmdPrev = script_param("cmdPrev");
$cmdNext = script_param("cmdNext");
$returnpoint = script_param("returnpoint");
$typerange = script_param("typerange");
$Piecerange= script_param("Piecerange");
$pricerange= script_param("pricerange");
$ss = script_param ("ss");




if ($cmdPrev == "<<" )
{$count = $count - 1;}

if ($cmdNext == ">>" )
{$count = $count + 1; }

if ($count < 0 )
{$count = 0;}


if ($CategoryKey == "")
{ $CategoryKey = 0; }

if ($ss == "")
{$ss = 1;}


$range[0]= " (Products.SalePrice > 0) " ;
$range[1]= "(Products.SalePrice > 0) AND (Products.SalePrice <= 499.99)" ;
$range[2]= "(Products.SalePrice >= 500) AND (Products.SalePrice <= 999.99)" ;
$range[3]= "(Products.SalePrice >= 1000) AND (Products.SalePrice <= 1499.99)" ;
$range[4]= "(Products.SalePrice >= 1500) AND (Products.SalePrice <= 2499.99)" ;
$range[5]= "(Products.SalePrice >= 2500) AND (Products.SalePrice <= 4499.99)" ;
$range[6]= "(Products.SalePrice >= 5000) " ;

$prange[0]= " All Prices " ;
$prange[1]= "Price less than $500" ;
$prange[2]= "Price $500 to less than $1,000" ;
$prange[3]= "Price $1,000 to less than $1,500" ;
$prange[4]= "Price $1,500 to less than $2,500)" ;
$prange[5]= "Price $2,500 to less than $5,000" ;
$prange[6]= "Price $5,000 and over " ;


$MAX_RECORD_DISPLAY = 6;

fleamarket_connect ()
or die ("fleamarket_connect failed\n");

if ( $CategoryKey == 0 )
{
switch ($ss)
{
case 1 : # Ascending sort

$query = sprintf ("SELECT Products.prodID, Products.prodName, Products.prodDescription,
Products.prodImageSmallPath, Products.RetailPrice, Products.prodImageLargePath, Products.CostPrice,
Products.SalePrice, Categorylink.CategoryKey, Products.ProdIDkey
FROM Products INNER JOIN
Categorylink ON Products.ProdIDkey = Categorylink.ProdIDkey INNER JOIN
Category ON Categorylink.CategoryKey = Category.CategoryKey
WHERE %s ORDER BY Products.prodID ",$range[$pricerange]);

break;


case 2: # Descending sort
$query = sprintf ("SELECT Products.prodID, Products.prodName, Products.prodDescription,Products.SalePrice,
Products.prodImageSmallPath, Products.RetailPrice, Products.prodImageLargePath, Products.CostPrice,
Categorylink.CategoryKey, Products.ProdIDkey
FROM Products INNER JOIN
Categorylink ON Products.ProdIDkey = Categorylink.ProdIDkey INNER JOIN
Category ON Categorylink.CategoryKey = Category.CategoryKey
WHERE %s ORDER BY Products.prodID ",$range[$pricerange]);

break;
default:
die ("unknow sort type");
break;
}

}
else
{
switch ($ss)
{
case 1 : # Ascending sort
$query = sprintf ("SELECT Products.prodID, Products.prodName,
Products.prodDescription, Products.prodImageSmallPath, Products.RetailPrice, Products.SalePrice,
Products.CostPrice, Products.prodImageLargePath,
Categorylink.CategoryKey, Category.CategoryName,Products.ProdIDkey
FROM Products INNER JOIN
Categorylink ON Products.ProdIDkey = Categorylink.ProdIDkey INNER JOIN
Category ON Categorylink.CategoryKey = Category.CategoryKey
WHERE Categorylink.CategoryKey = %s ORDER BY Products.prodID ", QUOTE_VALUE ($CategoryKey), $range[$pricerange]);
break;


case 2: # Descending sort
$query = sprintf ("SELECT Products.prodID, Products.prodName,
Products.prodDescription, Products.prodImageSmallPath, Products.RetailPrice, Products.SalePrice,
Products.CostPrice, Products.prodImageLargePath,
Categorylink.CategoryKey, Category.CategoryName,Products.ProdIDkey
FROM Products INNER JOIN
Categorylink ON Products.ProdIDkey = Categorylink.ProdIDkey INNER JOIN
Category ON Categorylink.CategoryKey = Category.CategoryKey
WHERE Categorylink.CategoryKey = %s AND %s ORDER BY Products.prodID ", QUOTE_VALUE ($CategoryKey), $range[$pricerange]); break;

default:
die ("unknow sort type");
break;
}


}



$result = mysql_query ($query)
or die ("Category Query failed\n");

$num = Mysql_num_rows($result);


$reccount = $num;

if ($count >=1 )
{

$query = $query ;
$query .= "limit ";
$query .= $count -1;
$query .= ",";
$query .= 1;


mysql_free_result ($result);


$result = mysql_query ($query)
or die ("post CategoryQuery failed\n");

while ($rowCategory = mysql_fetch_assoc ($result))
{ $ProdIDkey = $rowCategory['ProdIDkey'] ;}

}


$query = sprintf ("SELECT Products.prodID, Products.prodName, Products.prodDescription, Products.prodImageSmallPath, Products.RetailPrice, Products.prodImageLargePath,
Products.code AS id, Products.CostPrice, Products.SalePrice, Category.CategoryName, Products.code, Products.ProdIDkey, Products.Gramsofgold,
length.lengthDescription, Metal.MetalDescription, ColorGroupDetail.ColorIdTYpe, Products.Minimumcarattotalweight, Clarity.Clarity, Products.idWidth,
Width.WidthDescription, Category.FromCategoryKey, Products.UseModelnumber, Products.CategoryKey,
CategoryDescription.CategoryDescription
FROM Category INNER JOIN
CategoryDescription ON Category.CategoryKey = CategoryDescription.CategoryKey RIGHT OUTER JOIN
Products ON Category.CategoryKey = Products.CategoryKey LEFT OUTER JOIN
Width ON Products.idWidth = Width.idWidth LEFT OUTER JOIN
Clarity ON Products.IdClarity = Clarity.IdClarity LEFT OUTER JOIN
Metal ON Products.IDMetal = Metal.IdMetal LEFT OUTER JOIN
length ON Products.idlength = length.idlength LEFT OUTER JOIN
ColorGroupDetail ON Products.ColoridGroupDetail = ColorGroupDetail.ColoridGroupDetail
WHERE Products.ProdIDkey = %s ", QUOTE_VALUE ($ProdIDkey));


$Products = mysql_query ($query)
or die ("Product Query failed\n");

$numProducts = Mysql_num_rows($Products);
$stone = "";
$wCategoryName = "";
$Returnback = "";


while ($rowProducts = mysql_fetch_assoc ($Products))
{
$CategoryDescription = $rowProducts['CategoryDescription'] ;
$prodDescription = $rowProducts['prodDescription'] ;
$strprodName = $rowProducts['prodName'];
$RetailPrice = $rowProducts['RetailPrice'];
$picture =$rowProducts['prodImageLargePath'];
$CostPrice = $rowProducts['CostPrice'] ;
$prodID= $rowProducts['prodID'];
$SalesPrice = $rowProducts["SalePrice"];
$Savings = $RetailPrice - $SalesPrice;
$WCategoryKey =$rowProducts['CategoryKey'];
$WCategoryKeyb =$rowProducts['CategoryKey'];
$Model = $rowProducts['code'] ;

If ($rowProducts['UseModelnumber'] != "Y")
{ $Model .= $rowProducts['ProdIDkey'];
} Else
{ $Model = $rowProducts['prodID'];
}

$RetailPrice = currency($RetailPrice);
$SalesPrice = currency($SalesPrice);
$Savings = currency($Savings);

if ($rowProducts['ColorIdTYpe'] != "")
{$stone = "Y"; }
$ColorIdTYpe =$rowProducts['ColorIdTYpe'];

$price = $RetailPrice;
if (isset($SalesPrice))
{$price = $SalesPrice;}

$Minimumcarattotalweight = $rowProducts['Minimumcarattotalweight'];

if ( $Minimumcarattotalweight != "" and $Minimumcarattotalweight != 0 )
{ $stone = "Y"; }


if ( $rowProducts['Clarity'] != "")
{ $stone = "Y";}
$Clarity = $rowProducts['Clarity'];

$lengthDescription = $rowProducts['lengthDescription'];
$Gramsofgold = $rowProducts['Gramsofgold'];
$MetalDescription = $rowProducts['MetalDescription'];

print $CategoryDescription ;
}

$wCategoryName = "";
$wCategoryNameb = "";
$wCategoryNameb = breadcrumbsname($WCategoryKeyb);
$wCategoryNameb .= " at jewelry-treasures.com";
$wCategoryName = breadcrumbs($WCategoryKey);



$query = sprintf ("SELECT MatchingAccessories.sequence, Products.prodID, Products.prodName, Products.prodImageSmallPath,
Products.prodImageLargePath, Products.RetailPrice, Products.CostPrice, Products.page, Products.SalePrice,
MatchingAccessories.ProdIDkeyMatch, MatchingAccessories.IdMatching, MatchingAccessories.ProdIDkey
FROM MatchingAccessories INNER JOIN
Products ON MatchingAccessories.ProdIDkey = Products.ProdIDkey
WHERE MatchingAccessories.ProdIDkeyMatch = %s ORDER BY MatchingAccessories.sequence" ,QUOTE_VALUE ($ProdIDkey));


$resultMatch = mysql_query ($query)
or die ("Match Query failed\n");

$numMatch = Mysql_num_rows($resultMatch );

$query = sprintf ("SELECT ProductFeatures.IdFeaturesProduct, ProductFeatures.ProdIDkey,
ProductFeatures.IdFeatures, Features.FeaturesDescription, Features.Ico
FROM ProductFeatures INNER JOIN
Features ON ProductFeatures.IdFeatures = Features.IdFeatures
WHERE ProductFeatures.ProdIDkey = %s order by ProductFeatures.IdFeatures" ,QUOTE_VALUE ($ProdIDkey));


$resultFeatures = mysql_query ($query)
or die ("Features Query failed\n");

$numFeatures = Mysql_num_rows($resultFeatures );

if (isset($returnpoint )){

$returnback = $returnpoint ;
$returnback = ereg_replace('\|', '&' , $returnback);
}else
{
$returnpoint = "/ProductDetail.php?ProdIDkey=";
$returnpoint .=$ProdIDkey;
$returnpoint .="|CategoryKey=";
$returnpoint .=$CategoryKey;
$returnpoint .="|Count=";
$returnpoint .=$count;
$returnpoint .="|recCount=";
$returnpoint .=$reccount;
$returnpoint .="|pricerange=";
$returnpoint .=$pricerange;
$returnpoint .="|typerange=";
$returnpoint .=$typerange;
$returnpoint .="|Piecerange=";
$returnpoint .=$Piecerange;
$returnpoint .="|ss";
$returnpoint .=$ss;
}

$strprodNameb = $strprodName;
$strprodNameb .= " at jewelry-treasures.com";
?>


<?=$strprodNameb?>

















Yahoo! PayDirect Accepted Here








??? 0) { ?>


of





























Model Number ?


















Return to Selection





Note: Prices and availability are subject to change without notice. View
our product policies for more information.




















Retail price
Our Price
Savings




if ($numFeatures !=0)
{?>





Product Features



{

$FeaturesDescription =$rowFeatures['FeaturesDescription'];
$Ico = $rowFeatures['Ico'];
?>













































Stone Information
Clarity
Color
Minimum carat total weight



























Metal Information
Length
Metal Description
Weight ?Grams





{?>





Matching Accessories



{
$ProdIDkeym = $rowMatch['ProdIDkey'];
$picturem =$rowMatch['prodImageSmallPath'];
$prodDescriptionm = $rowMatch['prodName'];
?>
















include('includes/footer.php');
?>

?Re: blank field after selection
Author:??(---.cpe.net.cable.roger)
Date:???01-10-04 09:40

only thing i can see is that there is no space after the variable



try adding a space

?Re: blank field after selection
Author:??(---.si.rr.com)
Date:???01-13-04 20:32

a space did not work

http://68.174.18.76:8567/ProductDetail.php?ProdIDkey=1228&CategoryKey=251&Count=3&recCount=6&pricerange=0&ss=1

Go to Top??|??Go to Topic??|??Threaded View??|??Search?
??|??
New Topic
?Reply To This Message
?Your Name:
?Your Email:
?Subject:
Email replies to this thread, to the address above.
??

Provided By
Phorum