The field fIDpicture is used to store an image inside the database.
Obviously I want this image to show (and turn the fIDpicture into an actual picture).
I started writing a function in the controller.php to achieve something like this, but I got stuck..
function getPicture(){$db= Loader::db();$rs=$db->Execute('SELECT bfIDpcitrue FROM btProductInformation bpi WHERE categoryID = ?)
or should it be done with something like this?
function getPicture(){if($this->fIDpicture>0){returnFile::getByID($this->fIDpicture);}returnnull;}
Thanks in advance for someone who could help me out with this!
The second way is better. All the fields in your main database table name should be automatically loaded as class variables, so what you're trying to do in the second getPicture should totally work.
Code
Post Reply
Delete Post
You are allowed to delete your post for 5 minutes after it's posted.