'0') { if($myrows > '3') { $myrows = '3'; } while($av = mysql_fetch_array($rv)) { $na[] = $av[ItemID]; } srand ((float) microtime() * 10000000); $input = $na; $rand_keys = array_rand ($input, $myrows); $edno = $input[$rand_keys[0]]; $dve = $input[$rand_keys[1]]; $tri = $input[$rand_keys[2]]; //get the products list $q1 = "select oneshop_producten.*, oneshop_categories.*, devbg_subcategories.* from oneshop_producten left join oneshop_categories on oneshop_producten.ItemCategory = oneshop_categories.CategoryID left join devbg_subcategories on oneshop_producten.ItemSubcategory = devbg_subcategories.SubcategoryID where oneshop_producten.ItemID in ('$edno', '$dve', '$tri') order by ItemName "; */ $q1 = "select oneshop_producten.*, oneshop_categories.*, devbg_subcategories.* from oneshop_producten left join oneshop_categories on oneshop_producten.ItemCategory = oneshop_categories.CategoryID left join devbg_subcategories on oneshop_producten.ItemSubcategory = devbg_subcategories.SubcategoryID order by rand() limit 0,3"; $r1 = mysql_query($q1) or die(mysql_error()); if(mysql_num_rows($r1) == '0') { $NoItems = "
Er zijn geen producten aanwezig...
"; } else { while($a1 = mysql_fetch_array($r1)) { $MyPrice = number_format($a1[ItemPrice], 2, ".", ""); if(!empty($a1[ItemImage])) { $DisplayImage = ""; } else { $DisplayImage = " "; } $DisplayIndex .= "
$DisplayImage Klik voor meer info: $a1[ItemName]

Categorie: $a1[CategoryName]"; if(!empty($a1[SubcategoryID])) { $DisplayIndex .= ", $a1[SubcategoryName]"; } $DisplayIndex .= "

Prijs: $MyPrice euro


"; } } if(isset($NoItems)) { echo $NoItems; } else { require_once("templates/index_template.php"); } require_once("voet.php"); ?>