error when I'm trying to add an array to a select attribute

Permalink
Hi All,

I'm trying to set a select attribute with an array (in this case $genres):

$newPage->setAttribute('main_entry_music_genres', $genres);


But when I do this, I get the following issue:

mysql error: [-9999: Input Array does not match ?: select ID, displayOrder, value from atSelectOptions where value = 'quiet storm' and akID = ] in Execute(, )


Any ideas of what I can do?

 
lexbi replied on at Permalink Reply
bump
A3020 replied on at Permalink Reply
A3020
lexbi replied on at Permalink Best Answer Reply
I have indeed seen that post as it was myself that made it :)

Turn out I was being an idiot, I was trying to pass an array with multiple arrays in it. Was getting some info from an API and for some reason didn't notice that the data was like that. Oops.
A3020 replied on at Permalink Reply
A3020
Haha, ok. Glad you solved it ;)