Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
napuniti array iz mysql-a???

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
lamza



Joined: 09 Apr 2006
Posts: 3
Location: Zagreb

PostPosted: 09.04.2006 20:57    Post subject: napuniti array iz mysql-a??? Add user to your forum ignore list Reply with quote

ljudi pomoc,
molim vas ako mi moze netko objasniti kako da popunim neki dvodimenzionalni array sa vrijednostima iz baze...
ovako dakle, imam

$nesto = array(
$id_iz_prve_baze => array('$iz_druge_baze','..','..');
);

sa time da je ovo $iz_druge_baze povezano sa id-om ovoga iz prvebaze....
nadam se da ste me razumjeli...

puno hvala...
Back to top
View user's profile Send private message Visit poster's website
Sulien



Joined: 04 Jan 2004
Posts: 2905
Location: Zagreb

PostPosted: 09.04.2006 23:36    Post subject: Add user to your forum ignore list Reply with quote

Nismo te razumijeli... ID nije 'iz baze' nego iz tablice, a ti lijepo malo bolje reci kakve su tablice i što trebaš
Back to top
View user's profile Send private message Send e-mail Visit poster's website
_butch



Joined: 10 Sep 2003
Posts: 870
Location: Maichno, Krlovc

PostPosted: 10.04.2006 00:18    Post subject: Add user to your forum ignore list Reply with quote

Ako imas 2 odvojene baze (iako neznam zasto bi to imo), but I'm gonna go that way, iz 1.baze izvuces podkatke koje oces u 1.array. Otvoris 2. bazu, napravis query koji koristi di-eve iz 1.baze i te podatke ubacis u 2. array. I kasnije si napravis 3.array gdje si formatiras podatke sa foreachom recimo. -> GLUUPO

Ako imas 2 tablice, neznam primijer sa vijestima i komentarima - jedna vijest ima x komentara i ti to oces imati u 1 arrayu opet izvadis za odredjenu vijest sve komentare za istu i ubacis u array gdje su ti orginalni podaci..

array(
[1] => array ( 'id' => '1', 'nesto' => array ( 'bla', 'ug', 'arh') )
);
Daj vise informacija kakvo je pravo stanje stvari ili samo zelis znati teoretski?

_________________
FRENCH GUARD: No chance, English bed-wetting types.
I burst my pimples at you and call your door-opening request a silly thing, you tiny-brained wipers of other people's bottoms!
Flikrac
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
lamza



Joined: 09 Apr 2006
Posts: 3
Location: Zagreb

PostPosted: 10.04.2006 10:39    Post subject: Add user to your forum ignore list Reply with quote

da sorry decki dakle, krivo sam se izrazio...
trebaju mi dakle podaci iz tablica a ne iz baza, sorry..my mistake...Sad
imam dakle dvije tablice, koje su povezane....

main_kategorija i prva_kategorija...

e sada ja treba napraviti nesto ovako, sa time da mi se podaci upisuju iz tih tablica....

$nesto_nebitno = array(
$id_main_kategorije => array('$id_prve_kategorije,'..','..');
);

sa time da id_prve_kategorije je direktno povezan sa id_main_kategorije...
moj problem je sto neznam na taj nacin popuniti array...

Sad
Back to top
View user's profile Send private message Visit poster's website
Sulien



Joined: 04 Jan 2004
Posts: 2905
Location: Zagreb

PostPosted: 10.04.2006 10:55    Post subject: Add user to your forum ignore list Reply with quote

Nešto si to krivo smislio. U kojem su odnosu main_ i prva_ ?

Objasni što si htio napraviti ovime i reći ćemo ti u čemu si pogriješio u osmišljavanju tablica i zašto sad imaš problema.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
lamza



Joined: 09 Apr 2006
Posts: 3
Location: Zagreb

PostPosted: 14.04.2006 23:08    Post subject: Add user to your forum ignore list Reply with quote

hvala decki rjesio sam problem...
hvala puno Smile
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group