Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Segregowanie danych w wyswietlanej tabeli.

 
Post new topic   Reply to topic    Smarty Forum Index -> Language: Polish
View previous topic :: View next topic  
Author Message
piniasty
Smarty n00b


Joined: 01 Apr 2014
Posts: 1

PostPosted: Tue Apr 01, 2014 10:28 am    Post subject: Segregowanie danych w wyswietlanej tabeli. Reply with quote

Witam. Mam problem (no inaczej bym nie pisał nie Very Happy )
Moze na początek kawałek kodu:

Code:
$sql = 'CALL replacement ('.$changeweek.')';
$stmt = $hDB->prepare($sql);
           $stmt->execute();
         $num = $stmt->rowCount();
         
         $result = $stmt->setFetchMode(PDO::FETCH_ASSOC);
         for ($i=0;$i<$num;$i++){
            $resultw = $stmt->fetch();
            $wr[] = $resultw;
         }
$smarty->assign('wr',$wr);


Mam z tego tablicę:

-------------------------------------------------------------
direction | driver | truck | client
-------------------------------------------------------------
IN | kowalski | CBA 2659 | klient
--------------------------------------------------------------
OUT | nowak | CBA 2659 | klient
-------------------------------------------------------------

Jak to wyrzucic na stronę w Smarty w formie tabelki :

-----------------------------------------------
OUT | truck | IN | client
------------------------------------------------
nowak | CBA 2659 | kowalski | klient
-------------------------------------------------

Poprosze o pomoc.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Language: Polish All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP