Created
December 4, 2013 12:40
-
-
Save viniciusss/7786836 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function g_arr_executa_query($query, $tipo = 'buscar') { | |
switch($tipo) { | |
case 'buscar': | |
try { | |
return $executa->fetchAll($select); | |
} catch (Exception $e) { | |
if( APP_ENV == ENV_DEV ) { | |
throw new Exception($e->getMessage(), $e->getCode()); | |
} | |
return array(); | |
} | |
break; | |
break; | |
} | |
// resto codigo atual | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment