Advertisement
buddyq

Untitled

Nov 25th, 2015
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $search_options = array();
  2.  
  3.   if (isset($_GET['office_number'])) {
  4.     if (!empty($_GET['office_number'])) {
  5.       $search_options[] = '(ListOfficeMLSID='.$_GET['office_number'].')';
  6.     }
  7.   }
  8.   if (isset($_GET['mls_number'])) {
  9.     if (!empty($_GET['mls_number'])) {
  10.       $search_options[] = '(MLSNumber='.$_GET['mls_number'].')';
  11.     }
  12.   }
  13.   if (isset($_GET['status'])) {
  14.     if (!empty($_GET['status'])) {
  15.       $search_options[] = '(Status='.$_GET['status'].')';
  16.     }
  17.   }
  18.  
  19.   $options_separated = implode(",", $search_options);
  20.   // print_r ($options_separated);
  21.   $search = $rets->SearchQuery('Property','RESI',
  22.     $options_separated, // This works. Querystring is ?office_number=001203&mls_number=&begin_date=&end_date=
  23.     array(
  24.         'Select' => 'Status,MLSNumber'
  25.     ));
  26.  
  27.  
  28. // OUTPUT //
  29.  
  30. 46 Records found!
  31. Array
  32. (
  33.     [Status] => Active
  34.     [MLSNumber] => 9973908
  35. )
  36. Array
  37. (
  38.     [Status] => Active
  39.     [MLSNumber] => 3644932
  40. )
  41. Array
  42. (
  43.     [Status] => Active
  44.     [MLSNumber] => 7326558
  45. )
  46. Array
  47. (
  48.     [Status] => Active
  49.     [MLSNumber] => 6300379
  50. )
  51. Array
  52. (
  53.     [Status] => Active
  54.     [MLSNumber] => 9280950
  55. )
  56. Array
  57. (
  58.     [Status] => Active
  59.     [MLSNumber] => 5937901
  60. )
  61. Array
  62. (
  63.     [Status] => Active
  64.     [MLSNumber] => 9043031
  65. )
  66. Array
  67. (
  68.     [Status] => Active
  69.     [MLSNumber] => 8704645
  70. )
  71. Array
  72. (
  73.     [Status] => Active
  74.     [MLSNumber] => 7979640
  75. )
  76. Array
  77. (
  78.     [Status] => Active
  79.     [MLSNumber] => 9961888
  80. )
  81. Array
  82. (
  83.     [Status] => Active
  84.     [MLSNumber] => 4220240
  85. )
  86. Array
  87. (
  88.     [Status] => Active
  89.     [MLSNumber] => 7479277
  90. )
  91. Array
  92. (
  93.     [Status] => Active
  94.     [MLSNumber] => 8237518
  95. )
  96. Array
  97. (
  98.     [Status] => Active
  99.     [MLSNumber] => 6303257
  100. )
  101. Array
  102. (
  103.     [Status] => Active
  104.     [MLSNumber] => 5531064
  105. )
  106. Array
  107. (
  108.     [Status] => Pending - Taking Backups
  109.     [MLSNumber] => 2769713
  110. )
  111. Array
  112. (
  113.     [Status] => Pending - Taking Backups
  114.     [MLSNumber] => 1058701
  115. )
  116. Array
  117. (
  118.     [Status] => Pending - Taking Backups
  119.     [MLSNumber] => 2850206
  120. )
  121. Array
  122. (
  123.     [Status] => Active
  124.     [MLSNumber] => 6936956
  125. )
  126. Array
  127. (
  128.     [Status] => Active
  129.     [MLSNumber] => 2888683
  130. )
  131. Array
  132. (
  133.     [Status] => Active
  134.     [MLSNumber] => 7296296
  135. )
  136. Array
  137. (
  138.     [Status] => Active
  139.     [MLSNumber] => 8692772
  140. )
  141. Array
  142. (
  143.     [Status] => Active
  144.     [MLSNumber] => 3469001
  145. )
  146. Array
  147. (
  148.     [Status] => Active
  149.     [MLSNumber] => 5183234
  150. )
  151. Array
  152. (
  153.     [Status] => Active
  154.     [MLSNumber] => 1464339
  155. )
  156. Array
  157. (
  158.     [Status] => Active
  159.     [MLSNumber] => 5084432
  160. )
  161. Array
  162. (
  163.     [Status] => Active
  164.     [MLSNumber] => 6214716
  165. )
  166. Array
  167. (
  168.     [Status] => Pending - Taking Backups
  169.     [MLSNumber] => 5026725
  170. )
  171. Array
  172. (
  173.     [Status] => Active
  174.     [MLSNumber] => 2925019
  175. )
  176. Array
  177. (
  178.     [Status] => Active
  179.     [MLSNumber] => 9038028
  180. )
  181. Array
  182. (
  183.     [Status] => Active
  184.     [MLSNumber] => 6151277
  185. )
  186. Array
  187. (
  188.     [Status] => Pending - Taking Backups
  189.     [MLSNumber] => 5919214
  190. )
  191. Array
  192. (
  193.     [Status] => Active
  194.     [MLSNumber] => 1764394
  195. )
  196. Array
  197. (
  198.     [Status] => Pending - Taking Backups
  199.     [MLSNumber] => 1335349
  200. )
  201. Array
  202. (
  203.     [Status] => Pending - Taking Backups
  204.     [MLSNumber] => 7954866
  205. )
  206. Array
  207. (
  208.     [Status] => Active
  209.     [MLSNumber] => 4348252
  210. )
  211. Array
  212. (
  213.     [Status] => Active
  214.     [MLSNumber] => 3319234
  215. )
  216. Array
  217. (
  218.     [Status] => Active
  219.     [MLSNumber] => 1312539
  220. )
  221. Array
  222. (
  223.     [Status] => Active
  224.     [MLSNumber] => 6813803
  225. )
  226. Array
  227. (
  228.     [Status] => Active
  229.     [MLSNumber] => 4434784
  230. )
  231. Array
  232. (
  233.     [Status] => Active
  234.     [MLSNumber] => 7397527
  235. )
  236. Array
  237. (
  238.     [Status] => Active
  239.     [MLSNumber] => 6636947
  240. )
  241. Array
  242. (
  243.     [Status] => Active
  244.     [MLSNumber] => 1605176
  245. )
  246. Array
  247. (
  248.     [Status] => Active
  249.     [MLSNumber] => 5648233
  250. )
  251. Array
  252. (
  253.     [Status] => Active
  254.     [MLSNumber] => 9438701
  255. )
  256. Array
  257. (
  258.     [Status] => Active
  259.     [MLSNumber] => 6888595
  260. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement