Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Wyswietlenie Danych z Oracle na html
PHPxyz
post 2.08.2012, 19:22:02
Post #1





Grupa: Zarejestrowani
Postów: 1
Pomógł: 0
Dołączył: 2.08.2012

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


Mam problem z przerobieniem ponizszego kodu tak aby dzialal z Oracle
googlowalem i nic sensownego nie znalazlem , prosze o pomoc

chodzi o wyswietlenie danych z tabeli z bazy Oracla


  1. <html>
  2. <head>
  3. <title>Search data</title>
  4. <script type="text/javascript">
  5.  
  6.  
  7. </script>
  8. </head>
  9. <body>
  10. <table>
  11. <tr>
  12. <td align="center">EMPLOYEES DATA</td>
  13. </tr>
  14. <tr>
  15. <td>
  16. <table border="1">
  17. <tr>
  18. <td>NAME</td>
  19. <td>EMPLOYEES<br>NUMBER</td>
  20. <td>ADDRESS</td>
  21. </tr>
  22. <?
  23. //the example of searching data
  24.  
  25. //search.php
  26. mysql_connect("localhost","admin","admin123");//database connection
  27. mysql_select_db("michal");
  28.  
  29. $order = "SELECT * FROM testowa_baza ORDER BY lp";
  30. //order to search data
  31. //declare in the order variable
  32.  
  33. $result = mysql_query($order);
  34. //order executes the result is saved
  35. //in the variable of $result
  36.  
  37. while($data = mysql_fetch_row($result)){
  38. echo("<tr><td>$data[1]</td><td>$data[0]</td><td>$data[2]</td></tr>");
  39. }
  40. ?>
  41. </table>
  42. </td>
  43. </tr>
  44. </table>
  45. </body>
  46. </html>
  47.  


Ten post edytował PHPxyz 2.08.2012, 19:22:43
Go to the top of the page
+Quote Post
nospor
post 2.08.2012, 19:39:56
Post #2





Grupa: Moderatorzy
Postów: 36 451
Pomógł: 6292
Dołączył: 27.12.2004




Poprostu zamiast funkcji mysql_ masz użyć odpowiedników oci_


--------------------

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

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: 23.04.2024 - 14:43