Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php] odwołanie do klasy
tomi1985
post
Post #1





Grupa: Zarejestrowani
Postów: 192
Pomógł: 12
Dołączył: 23.09.2010
Skąd: Warszawa

Ostrzeżenie: (0%)
-----


Hej,

wstyd się przyznać ale zapomniałem jak się odwołuje do klasy biggrin.gif


Mam taką klasę i chciałbym się do niej odwołać z innego pliku aby tylko pobrać tablicę z wynikami...

  1. class LoadDate{
  2.  
  3. private $showLoadDate;
  4.  
  5. public function loadDate(){
  6. $query = '
  7. SELECT
  8. ads.idAds, ads.firmName, ads.category, ads.voivodeship, ads.city, ads.postCode, ads.street, ads.text, ads.phone, ads.phone2, ads.webSite, ads.mail, ads.pricing, ads.priceDown, ads.priceUp, ads.map, ads.keywords, ads.active,
  9. city.idCity, city.city,
  10. category.idCategory, category.category,
  11. voivodeship.idVoivodeship, voivodeship.voivodeship
  12. FROM ads
  13. INNER JOIN city on ads.city = city.idCity
  14. INNER JOIN category on ads.category = category.idCategory
  15. INNER JOIN voivodeship on ads.voivodeship = voivodeship.idVoivodeship
  16. WHERE ads.active = 1 AND ads.idAds = "15"
  17. ';
  18.  
  19. $this->so->doit($query);
  20.  
  21. while($this->so->next_record()){
  22. $this->backString = $this->config->generator($firmName,$file);
  23.  
  24. $this->showLoadDate = array (
  25. 'firmName' => $this->so->f('firmName'),
  26. 'city' => $this->so->f('city'),
  27. 'category' => $this->so->f('category'),
  28. 'voivodeship' => $this->so->f('voivodeship'),
  29. 'postCode' => $this->so->f('postCode'),
  30. 'street' => $this->so->f('street'),
  31. 'mail' => $this->so->f('mail'),
  32. 'phone' => $this->so->f('phone'),
  33. 'phone2' => $this->so->f('phone2'),
  34. 'webSite' => $this->so->f('webSite'),
  35. 'priceDown' => $this->so->f('priceDown'),
  36. 'priceUp' => $this->so->f('priceUp'),
  37. 'pricing' => $this->so->f('pricing'),
  38. 'text' => $this->so->f('text')
  39. );
  40. }
  41.  
  42. return $this->showLoadDate;
  43. }
  44. }


pomoże ktoś ?
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 05:52