This topic is locked

ABC Menu

2/5/2009 9:30:22 AM
PHPRunner General questions
M
mmponline author

I got this menu that displays (eg. towns or materials, etc.) in a menu, similar to the properties template.

global $conn,$smarty;

$rowsearch=array();

$rstt = db_query("SELECT TropicProducts.Materials, Count(TropicProducts.Materials) AS CountOfMaterials FROM TropicProducts GROUP BY TropicProducts.Materials", $conn);

$ind=0;

while($data=db_fetch_array($rstt))

{

$rows=array();

$MaterialsName = str_Replace(" ","+",$data["Materials"]);

$rows["href"]="TropicProducts_list.php?a=search&value=1&SearchFor=".$MaterialsName."&SearchOption=Contains&SearchField=Materials";

$rows["1Materials_value"]=$data["Materials"]." (".$data["CountOfMaterials"].")<br>";

$rowsearch="<a href=\"".$rows["href"]."\">".$rows["1Materials_value"]."</a>";

echo $rowsearch;

}
to add where statement: Put

WHERE Active='Yes'

before GROUP BY


I now need something similar but the menu must show an albhabet, and when you click on the alphabet letter (A B C D E etc.), it needs to display only entries STARTING with that letter. How can I do this?
In addition, I'd like to create my own pictures and have that displayed instead of the text. I will name the letters a.gif, b.gif, c,gif, etc.
Any help appreciated.

J
Jane 2/6/2009

Stephan,
this task requires a lot of custom code.

Unfortunately we don't have a ready to go solution for this.