6 |
$pod_option=""; // HTML pod <option> |
$pod_option=""; // HTML pod <option> |
7 |
$nad_option=""; // HTML nad <option> |
$nad_option=""; // HTML nad <option> |
8 |
|
|
9 |
$result = pg_Exec ($conn, "select id,naziv from org_jed where aktivna=true"); |
$result = pg_Exec ($conn, "select id,naziv from org_jed where aktivna=true order by id"); |
10 |
for ($k = 0; $k < pg_numrows($result); $k++) { |
for ($k = 0; $k < pg_numrows($result); $k++) { |
11 |
$row=pg_fetch_array($result,$k); |
$row=pg_fetch_array($result,$k); |
12 |
$nad_option.="<option value=\"$row[id]\""; |
$nad_option.="<option value=\"$row[id]\""; |
14 |
$nad_option.=">$row[naziv]</option>\n"; |
$nad_option.=">$row[naziv]</option>\n"; |
15 |
} |
} |
16 |
|
|
17 |
$result = pg_Exec ($conn, "select pod_id,nad_id,pod_naziv from org_pod_jed where pod_aktivna=true"); $delim = ""; |
$result = pg_Exec ($conn, "select pod_id,nad_id,pod_naziv from org_pod_jed where pod_aktivna=true order by nad_id,pod_id"); $delim = ""; |
18 |
for ($k = 0; $k < pg_numrows($result); $k++) { |
for ($k = 0; $k < pg_numrows($result); $k++) { |
19 |
$row=pg_fetch_array($result,$k); |
$row=pg_fetch_array($result,$k); |
20 |
echo "$delim \"$row[nad_id],$row[pod_id],$row[pod_naziv]\" "; |
echo "$delim \"$row[nad_id],$row[pod_id],$row[pod_naziv]\" "; |