Forum Activity for @nate

nate
@nate
02/03/14 10:29:22AM
917 posts

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.
nate
@nate
02/03/14 09:35:44AM
917 posts

FIND IN SET(id, column)


Jamroom Developers

Can I do this code in jamroom and if so what am I doing wrong? The audio_applied_mixlics will have a comma separated list of numbers, ie 111,132,506.
$_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);

updated by @nate: 03/20/14 01:02:50AM
nate
@nate
01/27/14 06:55:22PM
917 posts

Form Select


Jamroom Developers

I thought it was likely an updated way to do it.
nate
@nate
01/27/14 09:09:51AM
917 posts

Form Table IDs/Data


Jamroom Developers

It's working, As I'm sure you expected. lol
nate
@nate
01/27/14 09:01:23AM
917 posts

Form Table IDs/Data


Jamroom Developers

Substring here I come.

Thanks Brian. You're by far the best support team ever.
nate
@nate
01/27/14 07:49:07AM
917 posts

Form Table IDs/Data


Jamroom Developers

I guess I wasn't very clear in my post. The table I am adding to is just aform table.

$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);

That's just a peace of the code to show you what I mean by table.

Steve has a js function that populates the table rows. I want to identify them so we don't add duplicates. I basically just need each row to have data that can be read via js.

I was thinking something like:
$dat[2]['data'] = $_rt['unique_id'];
nate
@nate
01/27/14 06:23:40AM
917 posts

Form Table IDs/Data


Jamroom Developers

When building a table inside a module view or a form; how can I add an ID or data to the table row?

I'll be adding rows to this table via AJAX.

What I need to do is run a jQuery check to prevent duplicate entries into the table, so I need to identify each row.
updated by @nate: 02/26/14 07:42:55PM
nate
@nate
01/26/14 07:29:10PM
917 posts

Form Select


Jamroom Developers

I'm not the author but I would have easily made the same mistake.

Thanks.
nate
@nate
01/26/14 01:13:11PM
917 posts

Form Select


Jamroom Developers

I have a select element in a form that is suppose to run a query for it's options. Instead of running the query each time it seems to only query them the first time and from then on it keeps loading the saved options from the db.

$_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);

Is there a work around?
updated by @nate: 02/26/14 07:29:23PM
nate
@nate
01/22/14 05:32:39PM
917 posts

jrFormSubmit();


Jamroom Developers

I was thinking, as long as the module (index.php) gives an ajax repose it should work. No?
  88