Advertisement:

Author Topic: [SOLVED]selecting all cityArea under a city is not working using custom query  (Read 683 times)

osclassLover

  • Newbie
  • *
  • Posts: 39
  • thinking to achieve new in osclass
i am using modern, theme

there i have stored cityArea under a city.

when i selecting the all area under a city its giving only one area only, i dont know why...

for example:

i have list 3 area under a city

sample 1, sample 2 , sample 3( cityId for this areas are same (50000) )

i use the following custom query inside functions.php file.

$conn = getConnection();
/
      $area = $conn->osc_dbFetchResult("SELECT * FROM `oc_t_city_area`WHERE `fk_i_city_id` =50000");
           print_r($area);
 but it prints the sample 1 only in the result, i dont know why

pls help me someone...thanks...

« Last Edit: May 02, 2015, 04:41:16 pm by osclassLover »

serjuc11111

  • Hero Member
  • *****
  • Posts: 814
use:

foreach($area as $area2)
echo $area2['s_name']; // or your field needed!