| @@ 201-217 (lines=17) @@ | ||
| 198 | * @param int $start |
|
| 199 | * @return array |
|
| 200 | */ |
|
| 201 | function xfgb_getCountry($criteria = null, $limit = 0, $start = 0) |
|
| 202 | { |
|
| 203 | global $xoopsDB, $action; |
|
| 204 | $ret = array(); |
|
| 205 | ||
| 206 | $sql = 'SELECT * FROM ' . $xoopsDB->prefix('xfguestbook_country'); |
|
| 207 | if (isset($criteria) && $criteria !== '') { |
|
| 208 | $sql .= ' WHERE ' . $criteria; |
|
| 209 | } |
|
| 210 | $sql .= ' ORDER BY country_name ASC'; |
|
| 211 | $result = $xoopsDB->query($sql, $limit, $start); |
|
| 212 | while ($myrow = $xoopsDB->fetchArray($result)) { |
|
| 213 | array_push($ret, $myrow); |
|
| 214 | } |
|
| 215 | ||
| 216 | return $ret; |
|
| 217 | } |
|
| 218 | ||
| 219 | /** |
|
| 220 | * @param $country_id |
|
| @@ 70-85 (lines=16) @@ | ||
| 67 | * @param int $start |
|
| 68 | * @return array |
|
| 69 | */ |
|
| 70 | function xfgb_getCountry($criteria = null, $limit = 0, $start = 0) |
|
| 71 | { |
|
| 72 | global $xoopsDB, $action; |
|
| 73 | $ret = array(); |
|
| 74 | $sql = 'SELECT * FROM ' . $xoopsDB->prefix('xfguestbook_country'); |
|
| 75 | if (isset($criteria) && $criteria !== '') { |
|
| 76 | $sql .= ' WHERE ' . $criteria; |
|
| 77 | } |
|
| 78 | $sql .= ' ORDER BY country_code ASC'; |
|
| 79 | $result = $xoopsDB->query($sql, $limit, $start); |
|
| 80 | while ($myrow = $xoopsDB->fetchArray($result)) { |
|
| 81 | array_push($ret, $myrow); |
|
| 82 | } |
|
| 83 | ||
| 84 | return $ret; |
|
| 85 | } |
|
| 86 | ||
| 87 | /** |
|
| 88 | * @param null $criteria |
|