<?php

function getStore( $iStore ){
	$oDB = DataBase::getInstance();
	return $oDB->executeSQL( 'SELECT `iStore`, `iSupplier`, `sName`, `iPriority`, `iAvailableOnStock`, `iAvailableOutOfStock` FROM `' . $oDB->throwTableName( DB_STORES ) . '` WHERE `iStore` = ' . intval( $iStore ), true, DataBase::SINGLE_RECORD );
}

function saveStore( $aForm ){
	$oDB = DataBase::getInstance();
	return $oDB->save( DB_STORES, $aForm, 'iStore' );
}