Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [MySQL][PHP]Dane z 3 tabel
mirobor
post
Post #1





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

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


Witam, utknąłem. Proszę o pomoc.
Mam 3 tabele:

1. users
id | user | name

2. cat
id | name |

3. text
id | text | catid | userid | create_date | publish_date | active | aprove

Jak skonstruować wydajne zapytanie aby uzyskać:
najświeższy(text.publish_date), aktywny(text.active=1), zatwierdzony(text.aprove=1) tekst(text.text)
i móc wyświetlić jego:
text->id
text->text
users->name (w zależności od text.userid)
Pozdrawiam

Ten post edytował mirobor 18.03.2014, 12:11:35
Go to the top of the page
+Quote Post

Posty w temacie
- mirobor   [MySQL][PHP]Dane z 3 tabel   18.03.2014, 12:10:42
- - mar1aczi   Skorzystaj z "select from" + "where...   18.03.2014, 12:25:35
- - mirobor   czy to na pewno wystarczy, aby wyświetlić dane z 2...   18.03.2014, 14:27:34
- - Gość   Cytat(mirobor @ 18.03.2014, 14:27:34 ...   18.03.2014, 14:34:18


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

 



RSS Aktualny czas: 26.09.2025 - 05:08