i develop a small database application, during the test on my computer, it worked completely fine, but when i upload the code to my web host, it always show me the error
"Warning:Supplied argument is not a valid MySQL result resource in ......"
The warning is at a function
1 function get_value($query){
2
3 $result=mysql_query($query);
4 $i=0;
5 $column_count=mysql_num_fields($result);
6 if ($column_count==1){
7 while($row=mysql_fetch_array($result)){
8 $bucket[$i]=$row[0];
9 $i++;
10 }
11 }
12 else { //multiple column
13 while($row=mysql_fetch_array($result)){
14 $bucket[$i]=$row;
15 $i++;
16 }
17 }
18 reset($bucket);
19 return $bucket;
20 }
line 5, 13 and 18
what could have cause this
thanks