Queryes
From: CyberDog (milan_at_cdnforum.com)
Date: 02/28/05
- Next message: nome: "newbie has a question"
- Previous message: Oliver: "Re: Interesting phenomenon"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 28 Feb 2005 11:06:09 +0100
Hello;
I have a piece of code that lists some enteries, BUT it does as many
queryes as there are enteries, what is not good :)
Can someone tell ho this could be done more efficient?
Code:
$ucitaj = "select * from zajednice where za_id != 'a' order by ime_zaj";
$radnja_1 = mysql_query($ucitaj);
$radnja = mysql_fetch_array($radnja_1);
$ok_558 = mysql_num_rows($radnja_1);
$ok_559 = $ok_558 + 1;
$id_red = "1";
while ($ok_mali <= $ok_559) {
$ucitaj = "select * from zajednice where za_id = '$id_red' order by
ime_zaj";
$radnja_1 = mysql_query($ucitaj);
$radnja = mysql_fetch_array($radnja_1);
$tablica .= $radnja["ime_zaj"];
$tablica .= "<br/>";
$id_red++;
$ok_mali++;
}
- Next message: nome: "newbie has a question"
- Previous message: Oliver: "Re: Interesting phenomenon"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]