[#] hm X_Shell Backd00r [#]

Current Path : /var/www/clients/client35/web46/web/buen-fin/app/model/
Upload File :
Current File : /var/www/clients/client35/web46/web/buen-fin/app/model/ConsultarAcreditaciones.back.class.php

<?php 
	
	require_once 'conexion.class.php';

	class ConsularAcreditaciones{
		
		public function __construct(){
			$this->conex = Conexion::singleton_conexion();
		}

		public function acreditaciones(){
			try{
				$sql = "SELECT * FROM  `registro` ORDER BY id DESC";
				$query = $this->conex->prepare($sql);
				$query->execute();
				$r = $query->fetchAll(PDO::FETCH_ASSOC);
				if($query->rowCount() > 0):
					return $r;
				else:
					return false;
				endif;
				
			}catch(PDOExeption $e){
				print 'Error! '.$e->getMessage();
			}

		}

		public function busquedaAcreditaciones($str){
			try{
				$sql = "SELECT * FROM  `registro` WHERE codigo LIKE '%$str%' ORDER BY id DESC";
				$query = $this->conex->prepare($sql);
				$query->execute();
				$r = $query->fetchAll(PDO::FETCH_ASSOC);
				if($query->rowCount() > 0):
					return $r;
				else:
					return false;
				endif;
				
			}catch(PDOExeption $e){
				print 'Error! '.$e->getMessage();
			}

		}

	}
?>

Mr.hm X_Shell Backd00r 1.0, Coded By Mr.hm X_Shell Backd00r