function __get_newcity_id($name,$cx,$cy){

mysql_connect("localhost","root","123456");
mysql_select_db("zansg");
$query="select cid from t_city where cname=$name and cx=$cx and cy=$cy";
$result = mysql_query($query);
if($result){
$row = mysql_fetch_assoc($result);
$file=fopen("test.txt","w");
  fputs($file,$row["cid"]);
  fclose($file);
return $row["cid"];

}
}function __get_newcity_id(){

mysql_connect("localhost","root","123456");
mysql_select_db("zansg");
$query="select cid from t_city where cname='angel' and cx='11' and cy='63'";
$result = mysql_query($query);
if($result){
$row = mysql_fetch_assoc($result);
$file=fopen("test.txt","w");
  fputs($file,$row["cid"]);
  fclose($file);
return $row["cid"];

}
}为什么我在调用时:
echo(__get_newcity_id());能打印
而 echo(__get_newcity_id($name,$cx,$cy));怎么取不到值??请高手指点!!