FIND IN SET(id, column)
Jamroom Developers
Yes the datastore item is storing a comma separated list..
audio_applied_mixlics : 111,321,404,
I want to return any song that has the id 404 in it's audio_applied_mixlics list.
$_search = array();
$_search[] = "FIND IN SET ({$id}, audio_applied_mixlics)";
$_sc = array(
"search" => $_search,
"order_by" => array(
"_created" => "numerical_desc"
),
"pagebreak" => 6,
"page" => 1
);
$_rt = jrCore_db_search_items('xtSong', $_sc);
$dat[1]['title'] = 'id';
$dat[1]['width'] = '5%;';
$dat[2]['title'] = 'user';
$dat[2]['width'] = '10%;';
$dat[3]['title'] = 'percentage';
$dat[3]['width'] = '5%;';
$dat[4]['title'] = '';
$dat[4]['width'] = '75%;';
$html .= ujMultiItem_form_table_header($dat);$dat[2]['data'] = $_rt['unique_id'];$_sel = xtStem_get_stem_songs($_user['user_active_profile_id']);
// Select a type
$_tmp = array(
'name' => 'audio_stem_song',
'label' => 'song',//999
'help' => 'Select a song',
'type' => 'select',
'options' => $_sel,
'validate' => 'not_empty',
'required' => true
);
jrCore_form_field_create($_tmp);