Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [MySQL][PHP] pobranie danych z bazy jako nazwa
szybki
post
Post #1





Grupa: Zarejestrowani
Postów: 85
Pomógł: 0
Dołączył: 18.06.2014

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


Czy można bezpośrednio z mysql pobrać danę do tablicy ale tak, aby zmiast liczb, była wyświetlana np. nazwa pola?

Czyli:

  1. (
  2. [0] => Array
  3. (
  4. [id] => 0
  5. [name] => XXX
  6. [dir] => xxx
  7. [status] => 0
  8. )
  9.  
  10. [1] => Array
  11. (
  12. [id] => 0
  13. [name] => Test
  14. [dir] => Test
  15. [status] => 0
  16. )
  17.  
  18. )


Pobierałoby to:

  1. (
  2. [XXX] => Array
  3. (
  4. [id] => 0
  5. [name] => XXX
  6. [dir] => xxx
  7. [status] => 0
  8. )
  9.  
  10. [Test] => Array
  11. (
  12. [id] => 0
  13. [name] => Test
  14. [dir] => Test
  15. [status] => 0
  16. )
  17.  
  18. )
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 - 04:01