![]() |
![]() ![]() |
![]() |
![]() ![]()
Post
#1
|
|
![]() Grupa: Zarejestrowani Postów: 175 Pomógł: 2 Dołączył: 22.03.2007 Skąd: localhost Ostrzeżenie: (0%) ![]() ![]() |
Witam,
(podaję źródło mojej stronki)
To jest strona do wyświetlania rekordów z bazy. Moje pytanie polega na tym: Jak zrobić żeby wyświetlał się tylko jedna opcja z tej kategori a nie wszystkie ![]() Z góry dziękuje za pomoc Wiktor Meissner -------------------- "Homo sum, humani nihil a me alienum puto."
"Necessitas ultimum et maximum telum est." "Ventem seminabunt et turbinem metent." "Gallia est omnis divisa in partes tres..." |
|
|
![]()
Post
#2
|
|
![]() Grupa: Zarejestrowani Postów: 675 Pomógł: 15 Dołączył: 7.11.2004 Skąd: Katowice Ostrzeżenie: (0%) ![]() ![]() |
Jak zrobić żeby wyświetlał się tylko jedna opcja z tej kategori a nie wszystkie Z tej, czyli której ![]() ![]() Wystarczy w odpowiednim zapytaniu SQL (wybierającym opcje z 'tej' kategorii) dodać klauzulę LIMIT: Cytat The LIMIT clause can be used to constrain the number of rows returned by the SELECT statement. LIMIT takes one or two numeric arguments, which must both be non-negative integer constants (except when using prepared statements).
With two arguments, the first argument specifies the offset of the first row to return, and the second specifies the maximum number of rows to return. The offset of the initial row is 0 (not 1):
With one argument, the value specifies the number of rows to return from the beginning of the result set: In other words, LIMIT row_count is equivalent to LIMIT 0, row_count. -------------------- Kto pyta, nie błądzi...
Kto zbłądził, ten pyta... |
|
|
![]()
Post
#3
|
|
![]() Grupa: Zarejestrowani Postów: 175 Pomógł: 2 Dołączył: 22.03.2007 Skąd: localhost Ostrzeżenie: (0%) ![]() ![]() |
w tabeli mam pole url_id i każdy wpis ma inną wartość w tym polu
jak wpisać w php żeby wyświetlało tylko np. 1 (url_id) a nie wszystkie? ![]() -------------------- "Homo sum, humani nihil a me alienum puto."
"Necessitas ultimum et maximum telum est." "Ventem seminabunt et turbinem metent." "Gallia est omnis divisa in partes tres..." |
|
|
![]()
Post
#4
|
|
![]() Grupa: Zarejestrowani Postów: 318 Pomógł: 6 Dołączył: 27.01.2005 Ostrzeżenie: (0%) ![]() ![]() |
tbl - odpowiednia tabela -------------------- Prawo Wylera:
Nie ma rzeczy niemożliwych dla kogoś, kto nie musi ich zrobić sam. |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 12.07.2025 - 08:03 |