Last active
August 29, 2015 14:13
-
-
Save dennisdegryse/1d0a99f5585009a0c6b8 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 | |
class Item extends Data { | |
public function getSelectCategory($category_name) { | |
$category_name = "%$category_name%"; | |
$SQL = "SELECT category_id, category_name | |
FROM category | |
WHERE category_name LIKE :category_name | |
AND status='1' | |
"; | |
$query = $this->link->prepare($SQL); | |
$query->bindParam( ":category_name" , $category_name ); | |
$query->execute(); | |
if ( $query->rowCount() ){ | |
return $query->fetchAll(PDO::FETCH_ASSOC); | |
} | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment