![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 91 Pomógł: 8 Dołączył: 26.09.2011 Ostrzeżenie: (10%) ![]() ![]() |
Mam takie 2 tablice
Kod Array Jak je posortować po polu date a następnie połączyć te dwie tabele w 1 by była posortowana względem daty?
( [0] => Array ( [id] => 7 [topic] => sdds9990 [news_short] => sdfd [date] => 2014-01-02 22:36:00 [show_news] => 1 ) [1] => Array ( [id] => 10 [topic] => as [news_short] => asd [date] => 2014-01-07 15:26:09 [show_news] => 0 ) [2] => Array ( [id] => 11 [topic] => aaa [news_short] => sd [date] => 2014-01-10 11:15:01 [show_news] => 1 ) ) |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 91 Pomógł: 8 Dołączył: 26.09.2011 Ostrzeżenie: (10%) ![]() ![]() |
Chyba się troszke nie zrozumieniliśmy:D więc jeszcze raz:D dla przykładu, mam 2 tablice
Kod Array oraz ( [0] => Array ( [id] => 7 [topic] => sdds9990 [news_short] => sdfd [date] => 2014-01-02 22:36:00 [show_news] => 1 ) [1] => Array ( [id] => 10 [topic] => as [news_short] => asd [date] => 2014-01-07 15:26:09 [show_news] => 0 ) [2] => Array ( [id] => 11 [topic] => aaa [news_short] => sd [date] => 2014-01-10 11:15:01 [show_news] => 1 ) ) Kod Array i chciałbym otrzymać:( [0] => Array ( [id] => 7 [topic] => sdds9990 [news_short] => sdfd [date] => 2014-01-05 22:36:00 [show_news] => 1 ) [1] => Array ( [id] => 10 [topic] => as [news_short] => asd [date] => 2014-01-11 15:26:09 [show_news] => 0 ) [2] => Array ( [id] => 11 [topic] => aaa [news_short] => sd [date] => 2014-01-20 11:15:01 [show_news] => 1 ) ) Kod Array czyli połączone 2 tablice, która będzie posortowana względem daty (IMG:style_emoticons/default/wink.gif) ( [0] => Array ( [id] => 7 [topic] => sdds9990 [news_short] => sdfd [date] => 2014-01-02 22:36:00 [show_news] => 1 ) [1] => Array ( [id] => 7 [topic] => sdds9990 [news_short] => sdfd [date] => 2014-01-05 22:36:00 [show_news] => 1 ) [2] => Array ( [id] => 10 [topic] => as [news_short] => asd [date] => 2014-01-07 15:26:09 [show_news] => 0 ) [3] => Array ( [id] => 10 [topic] => as [news_short] => asd [date] => 2014-01-11 15:26:09 [show_news] => 0 ) [4] => Array ( [id] => 11 [topic] => aaa [news_short] => sd [date] => 2014-01-10 11:15:01 [show_news] => 1 ) [5] => Array ( [id] => 11 [topic] => aaa [news_short] => sd [date] => 2014-01-20 11:15:01 [show_news] => 1 ) ) Cytat Części z merge nie rozumiem bo ja tam widzę 1 tabelę z 3 tabelami w środku tongue.gif Możesz jasniej?(IMG:style_emoticons/default/biggrin.gif)
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 14.10.2025 - 14:57 |