I have three columns in a table named id
, wishlist_id
and type
and I want to fetch wishlist_id
according to the type
field into an array
I am using the follwing code:
$wishlistId = $mysql->getColumn("SELECT `wishlist_id` FROM `customer_wishlists` WHERE `type`='wishlist'");
print_r($wishlistId);
It is giving me only repeated value