oxstate.php

Go to the documentation of this file.
00001 <?php
00002 
00007 class oxState extends oxI18n
00008 {
00014     protected $_sClassName = 'oxstate';
00015 
00019     public function __construct()
00020     {
00021         parent::__construct();
00022         $this->init("oxstates");
00023     }
00024 
00033     public function getIdByCode( $sCode, $sCountryId )
00034     {
00035         $oDb = oxDb::getDb();
00036         return $oDb->getOne( "select oxid from oxstates where oxisoalpha2 = ".$oDb->quote( $sCode )." AND oxcountryid = ".$oDb->quote( $sCountryId ));
00037     }
00038 
00039 }