|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
piniasty Smarty n00b
Joined: 01 Apr 2014 Posts: 1
|
Posted: Tue Apr 01, 2014 10:28 am Post subject: Segregowanie danych w wyswietlanej tabeli. |
|
|
Witam. Mam problem (no inaczej bym nie pisał nie )
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 |
|
|
|
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
|