Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [Php-Nuke]Jak wziac dane z bazy w phpnuke
wozniak
post 22.02.2005, 14:17:34
Post #1





Grupa: Zarejestrowani
Postów: 278
Pomógł: 0
Dołączył: 21.11.2003

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


Jak w temacie jak wziać dane z bazy w phpnuke?
Zrobiłem tak:
  1. <?php 
  2.  
  3. if (!eregi(&#092;"modules.php\", $PHP_SELF)) { 
  4.    die (&#092;"You can't access this file directly...\"); 
  5.  
  6. } 
  7. require_once(&#092;"mainfile.php\"); 
  8. $module_name = basename(dirname(__FILE__)); 
  9.  
  10. include(&#092;"header.php\"); 
  11. $index = 0; 
  12. OpenTable(); 
  13. { 
  14. $zapytanie = sql_query(&#092;"SELECT * FROM baza\"); 
  15. while ($res11 = mysql_fetch_array($zapytanie)) 
  16. { 
  17. $id = $res11['id']; 
  18. echo(&#092;"$id <br />\"); 
  19. } 
  20. } 
  21. CloseTable(); 
  22. include(&#092;"footer.php\"); 
  23.  
  24. ?>

Ale nie działa ma ktso jakis pomysl?

Juz wiem robie sie to tak:
  1. <?php
  2.  
  3. if (!eregi(&#092;"modules.php\", $PHP_SELF)) {
  4.  die (&#092;"You can't access this file directly...\");
  5.  
  6. }
  7. require_once(&#092;"mainfile.php\");
  8. $module_name = basename(dirname(__FILE__));
  9.  
  10. include(&#092;"header.php\");
  11. $index = 0;
  12. OpenTable();
  13. {
  14. $pytanie = $db->sql_query(&#092;"SELECT * FROM cos\"); 
  15. while ($rekord = mysql_fetch_array($pytanie)) 
  16. { 
  17. $id = $rekord['id']; 
  18. echo(&#092;"$id <br />\");
  19. }
  20. }
  21. CloseTable();
  22. include(&#092;"footer.php\");
  23.  
  24. ?>


Ten post edytował wozniak 22.02.2005, 15:31:16
Go to the top of the page
+Quote Post

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 Wersja Lo-Fi Aktualny czas: 24.06.2025 - 13:05