in app/model/TestModel.php
I have use this function:
<?php
class TestModel
{
public static function getOption($column, $value)
{
$database = DatabaseFactory::getFactory()->getConnection();
$query = $database->prepare("SELECT * FROM `options` WHERE `category`='".$column."' AND `value`='".$value."' LIMIT 0,1");
$query->execute();
return $query;
}
}
And how I can calling this function in my: app/view/test/index.php ?
I have a test this , but not working:
echo $this->TestModel::getOption('listing_condition', $this->test->listing_condition)
echo TestModel::getOption('listing_condition', $this->test->listing_condition)
I have a view which comport a table of data, this data is generated on a model. How can I call this model in my view to be posted on my view.
app/controller/Test.php app/model/TestModel.php app/model/view/test/index.php
in app/model/TestModel.php I have use this function:
And how I can calling this function in my: app/view/test/index.php ?
I have a test this , but not working: echo $this->TestModel::getOption('listing_condition', $this->test->listing_condition) echo TestModel::getOption('listing_condition', $this->test->listing_condition)