Cake-PHP.ru
Ôîðóì ïðîãðàììèñòîâ CakePHP
(íà ñàéò)
Watched Topics
FAQ
Ïîèñê
Ïîëüçîâàòåëè
Ãðóïïû
Ðåãèñòðàöèÿ
Ïðîôèëü
Âîéòè è ïðîâåðèòü ëè÷íûå ñîîáùåíèÿ
Âõîä
Ñïèñîê ôîðóìîâ Cake-PHP.ru
->
Îáùèé
Îòâåòèòü
Èìÿ
Òåìà
Ñîîáùåíèå
Ñìàéëèêè
Äîïîëíèòåëüíûå ñìàéëèêè
Öâåò øðèôòà:
Ïî óìîë÷àíèþ
Ò¸ìíî-êðàñíûé
Êðàñíûé
Îðàíæåâûé
Êîðè÷íåâûé
Ƹëòûé
Çåë¸íûé
Îëèâêîâûé
Ãîëóáîé
Ñèíèé
Ò¸ìíî-ñèíèé
Èíäèãî
Ôèîëåòîâûé
Áåëûé
׸ðíûé
Ðàçìåð øðèôòà:
Ðàçìåð øðèôòà
Î÷åíü ìàëåíüêèé
Ìàëåíüêèé
Îáû÷íûé
Áîëüøîé
Îãðîìíûé
Çàêðûòü òåãè
[quote="ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…"]ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… $this->set('posts', $this->Post->find('all')); ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… $this->set('posts', $this->Post->findAll(null, array('id', 'user_id', 'title', 'body', 'created', 'modified'), 'id DESC')); (ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… post, ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… id, user_id ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… post.id, post.user_id. ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… username ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… Users. ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð… ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… find('all') ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…)[/quote]
Íàñòðîéêè
HTML
ÂÛÊËÞ×ÅÍ
BBCode
ÂÊËÞ×ÅÍ
Ñìàéëèêè
ÂÊËÞ×ÅÍÛ
Îòêëþ÷èòü â ýòîì ñîîáùåíèè BBCode
Îòêëþ÷èòü â ýòîì ñîîáùåíèè ñìàéëèêè
Åñëè ó âàñ ïëîõîå çðåíèå èëè âû íå ìîæåòå ïðî÷åñòü ýòîò êîä ïî êàêîé-òî äðóãîé ïðè÷èíå, òî îáðàòèòåñü çà ïîìîùüþ ê
Àäìèíèñòðàòîðó
.
Êîä ïîäòâåðæäåíèÿ: *
Ââåäèòå êîä â òî÷íîñòè òàê, êàê âû åãî âèäèòå. Êîä ÿâëÿåòñÿ ðåãèñòðî-çàâèñèìûì, à ñèìâîë íóëÿ èìååò êîñóþ ëèíèþ âíóòðè öèôðû.
×àñîâîé ïîÿñ: GMT + 3
Ïåðåéòè:
Âûáåðèòå ôîðóì
CakePHP Ôîðóì
----------------
Îáùèé
Óñòàíîâêà è íàñòðîéêà
Òâîð÷åñòâî
Âîïðîñû è ïîæåëàíèÿ
Êîììåíòàðèè ê ãëàâàì ðóêîâîäñòâà ïî CakePHP 1.1
Îáçîð òåìû
Àâòîð
Ñîîáùåíèå
ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…
Äîáàâëåíî: 29 Ìàé 2010 13:25:18
Çàãîëîâîê ñîîáùåíèÿ:
ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…
ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…
$this->set('posts', $this->Post->find('all'));
ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…
ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…
$this->set('posts', $this->Post->findAll(null, array('id', 'user_id', 'title', 'body', 'created', 'modified'), 'id DESC'));
(ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… post, ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… id, user_id ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… post.id, post.user_id. ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… username ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… Users. ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð… ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… find('all') ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð… ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…ïÑ—Ð…)
àíäðåé
Äîáàâëåíî: 29 Ìàé 2010 12:59:22
Çàãîëîâîê ñîîáùåíèÿ: âîïðîñ: ñîðòèðîâêà âûâîäà â ñâÿçàííûõ ìîäåëÿõ (find('all'))
âñåì ïðèâåò
òîëüêî íà÷èíàþ âíèêàòü â cake
óæå íåïðèëè÷íî äîëãî ìó÷àþñü êàê îòñîðòèðîâàòü ìàññèâ ïðè âûâîäå åãî â .ctp ôàéëå
ó ìåíÿ åñòü 2 òàáëèöû ñâÿçàííûõ Posts è Users
êîãäà áûëà îäíà òàáëèöà Posts -- ÿ ñîðòèðîâàë òàê:
$this->set('posts', $this->Post->findAll(null, array('id', 'user_id', 'title', 'body', 'created', 'modified'), 'id DESC'));
ò.å ïîëÿ âûáèðàëèñü Post.id, Post.user_id è ò.ä.,
Ñåé÷àñ ÿ ïðèìåíÿþ äðóãóþ êîíñòðóêöèþ, ÷òîáû îòîáðàæàòü èíôîðìàöèþ î ñâÿçàííûõ ñ ïîñòàìè ïîëüçîâàòåëÿõ:
$this->set('posts', $this->Post->find('all'));
êàê ñäåëàòü ñîðòèðîâêó â íåì?
èëè ìîæåò êòîíèáóäü ïîäñêàæåò ëþáîé ðàáî÷èé ñïîñîá
âûâîäà ÄÂÓÕ ñâÿçàííûõ òàáëèö ñ ñîðòèðîâêîé
ñïàñèáî
Powered by phpBB © 2001, 2005 phpBB Group
Ðóññêàÿ ïîääåðæêà phpBB
Åñëè íè÷åãî èíòåðåñíîãî íå íàøëè, ìîæíî ðåêëàìó ïî÷èòàòü, à ðåêëàìèðóåòñÿ ó íàñ ñåãîäíÿ «».