Hi
Sorry for my terreble english.
On my local (win) comp i have apache+mysql+ph p 4.05
I'm counting rows using mysql_num_rows function, and everything works fine.
When i upload php file on server it says:
Warning: mysql_num_rows( ): supplied argument is not a valid MySQL result
resource in /home/optikara/public_html/crosun/izn/insert_form.php on line 80
Server runs php 5.0.5
Code is:
--------------------------
//connect to database code goes here
$result_v_smjes taj = mysql_query("se lect * from v_smjestaja order by
v_smjestaja_naz iv ASC", $db);
// some other html code goes here
if (mysql_num_rows ($result_v_smje staj)) {
print "<select name=\"v_smjest aja\">\n";
while ($qry = mysql_fetch_arr ay($result_v_sm jestaj)) {
print "<option
value=\"$qry[id_smjestaja]\">$qry[v_smjestaja_naz iv]</option>";
}
print "</select>\n";
}
--------------------------
On my local comp this works. Plz any solution, in plain simple code:)))
tnx in advance.
Dejan
Sorry for my terreble english.
On my local (win) comp i have apache+mysql+ph p 4.05
I'm counting rows using mysql_num_rows function, and everything works fine.
When i upload php file on server it says:
Warning: mysql_num_rows( ): supplied argument is not a valid MySQL result
resource in /home/optikara/public_html/crosun/izn/insert_form.php on line 80
Server runs php 5.0.5
Code is:
--------------------------
//connect to database code goes here
$result_v_smjes taj = mysql_query("se lect * from v_smjestaja order by
v_smjestaja_naz iv ASC", $db);
// some other html code goes here
if (mysql_num_rows ($result_v_smje staj)) {
print "<select name=\"v_smjest aja\">\n";
while ($qry = mysql_fetch_arr ay($result_v_sm jestaj)) {
print "<option
value=\"$qry[id_smjestaja]\">$qry[v_smjestaja_naz iv]</option>";
}
print "</select>\n";
}
--------------------------
On my local comp this works. Plz any solution, in plain simple code:)))
tnx in advance.
Dejan
Comment