I have call a function to get the object from MySQL like this..
$product_id = 8;
$product = get_Product($product_id);
then do something with the $product
but now, I want to do this...
print_product_spec($product_id)
print_product_images($product_id)
is it better to pass the product_id to the function and connect to database again? or is it better to just put the object in the parameter and use the object from parameter like this..
//$product = an object
print_product_spec($product)
print_product_images($product)