Problem moj jest taki ze, gdy chce dodac kolejny element do tablicy to sie pojawia, ale zastepuje ten pierwszy.
Ponizej kod skryptu
Kod
<?php
$inv=array();
$breadcrump="Inventarization";
$room=$_GET['roomnr'];
$smarty->assign("room",$room);
switch($_GET['action']){
case "check":
$barcode=$_GET['barcode'];
$chk_inv=mysql_query("select i.i_name,i.i_barcode, r.r_roomnr, CONCAT_WS(', ', a.name,a.vorname) as owner from ivt.d_inventar i, ivt.d_room r, biss.f_angestellter a where i.i_barcode like '".$barcode."' and i.i_owner=a.angestellterid and r.r_id=i.i_roomid");
while($inventar=mysql_fetch_array($chk_inv,MYSQL_ASSOC)) array_push($inv,$inventar);
$smarty->assign("inv", $inv);
$template="inventarization.tpl";
break;
$inv=array();
$breadcrump="Inventarization";
$room=$_GET['roomnr'];
$smarty->assign("room",$room);
switch($_GET['action']){
case "check":
$barcode=$_GET['barcode'];
$chk_inv=mysql_query("select i.i_name,i.i_barcode, r.r_roomnr, CONCAT_WS(', ', a.name,a.vorname) as owner from ivt.d_inventar i, ivt.d_room r, biss.f_angestellter a where i.i_barcode like '".$barcode."' and i.i_owner=a.angestellterid and r.r_id=i.i_roomid");
while($inventar=mysql_fetch_array($chk_inv,MYSQL_ASSOC)) array_push($inv,$inventar);
$smarty->assign("inv", $inv);
$template="inventarization.tpl";
break;
uruchamiany jest w tym przypadku kawalek check. Kolejne elementy tablicy zalezne sa od podanej zmiennej i nie moge przekazywac wiecej niz jednej wartosci zmiennej jednoczesnie. Prosze o pomoc
pozdr