Sebuahhobi98

how to show error if $produk_id and $grup id nothing in db

Feb 13th, 2019
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. $grup_id=$this->input->get('grup_id');
  2. $produk_id=$this->input->get('produk_id');
  3. $get=$this->db->get_where('sma_product_prices',array('product_id'=>$produk_id,'price_group_id'=>$grup_id))->result();
  4. foreach($get as $data){
  5. if($get){
  6. if($data->price!==NULL || $data->price!=="")
  7. echo $data->price;
  8. else
  9. echo 'Data tidak ada!';
  10. }
  11. else
  12. echo "Error!";
  13. }
Add Comment
Please, Sign In to add comment