Advertisement
Guest User

Untitled

a guest
May 10th, 2012
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. function add_city($city)
  2. {
  3. //echo $city['state_id'];
  4. global $mysql;
  5.  
  6. if($city['name'] && $city['country_code'] && $city['active'])
  7. {
  8. $values="";
  9.  
  10. $values=array();
  11. if($city['state_id'])
  12. {
  13. $city['state_id'];
  14. $values.=$city['state_id'].",";
  15. }
  16. $result=$sql.$values;
  17. echo $result;
  18. if($city('metro_area_id')==NULL)
  19. {
  20. $values.=$city['metro_area_id'].",";
  21. }
  22. if($city['city_area_id']==NULL)
  23. {
  24. $values.=$city['city_area_id'].",";
  25. }
  26. if($city['station']==NULL)
  27. {
  28. $values.=$city['station'].",";
  29. }
  30. if($city['longitude']==NULL)
  31. {
  32. $values.=$city['station'].",";
  33. }
  34. if($city['latitude']==NULL)
  35. {
  36. $values.=$city['latitude'];
  37. }
  38. $query=$sql.$values.")";
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement