Reputation: 1
I'm trying to extract data from column 'field_data' in table tk_custom_data WHERE:
Result should be extracted when using $main_result
But this is simply too complicated for me, I'm still a total newbie. Please help :( Using IDIORM ORM
$product_id = ORM::for_table($config['db']['pre'].'product')->find_one($_GET['id']);
$item_id = $product_id['id'];
$value = '21';
$result = ORM::for_table($config['db']['pre'].'custom_data')
->where('product_id',$item_id)
->where('field_id',$value)
->find_one();
foreach ($result as $info) {
$main_result = $info['field_data'];
}
Upvotes: 0
Views: 65