Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Smarty i problem z dobraniem sie do danych

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Polish
View previous topic :: View next topic  
Author Message
awerskto
Smarty n00b


Joined: 19 Oct 2007
Posts: 3

PostPosted: Fri Oct 19, 2007 12:52 pm    Post subject: Smarty i problem z dobraniem sie do danych Reply with quote

Code:
{$wynik}                        stdClass Object (6)
                                        ->link = stdClass Object (3)
                                        ->handle = Resource id #6
                                        ->module = 3
                                        ->database = "test_com"
                                        ->handle = Resource id #7
                                        ->flags = 79
                                        ->info = Array (2)
                                  name => Array (6)
                                           0 => "id"
                                           1 => "machine"
                                           2 => "group_name"
                                           3 => "benchmark"
                                           4 => "param_name"
                                           5 => "value"
                                  type => Array (6)
                                         0 => "int8"
                                         1 => "text"
                                         2 => "text"
                                         3 => "text"
                                         4 => "text"
                                         5 => "float8"
                                        ->cols = 6
                                        ->rows = 309


Tak wyglada debug z smartow i mam pytanie jak sie dobrac to danych dokladnie 309 rzedow
{$wynik.$id} nie dziala. Poczytalem juz http://smarty.php.net/manual/en/language.syntax.variables.php
ale nie widze mozliwosc rozwiazanie tego problemu. Sad a w przegladarce
dostaje
Code:
Fatal error: Cannot use object of type stdClass as array
in /....
Back to top
View user's profile Send private message
sf
Smarty n00b


Joined: 26 Nov 2007
Posts: 2

PostPosted: Mon Nov 26, 2007 8:54 am    Post subject: Reply with quote

Bo w wyniku masz przecież obiekt i error wyjaśnia, że nie możesz używać tego tak samo jak tablicy. Kombinuj coś w stylu:

{$wynik->name.id}

Chodź nie wiem czy odwołać się można tylko do tablicy czy też do konkretnego klucza w ten spos
_________________
Most popular Open Source CMS. W przygotowaniu kurs php.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    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