checkboxes value gets stored as "array"
checkboxes value gets stored as "array"
Hey and thank you for this awesome tool.
It's been working great until I added checkboxes in the fields. The column "sok" wich I changed from being a select gets the value "Array" in the mysql db. I dont remember when i downloaded the files but the .js says its version 1.22.
this is my response in firebug when posting my edit
[quote]
Notice: Array to string conversion in dataTables/php/lib/Database/Driver/Mysql/Query.php on line 78
{"id":"row_6","error":"","fieldErrors":[],"data":[],"row":{"DT_RowId":"row_6","process":"Verksamhetsstyrning","handling":"wertwer","sok":"Array","lagringsplats":"Dokumenthanteringssystem","bevaras":"7 \u00e5r","kommentar":"ererwt"}}[/quote]
with this as post data
[quote]action edit
data[bevaras] 7 år
data[handling] wertwer
data[kommentar] ererwt
data[lagringsplats] Dokumenthanteringssystem
data[process] Verksamhetsstyrning
data[sok][] Upphandlingsnummer
data[sok][] Fastighetsbeteckning
id row_6
table [/quote]
the last line in this code gets the error
[code]protected function _prepare( $sql )
{
$this->_stmt = $this->_dbcon->prepare( $sql );
// bind values
for ( $i=0 ; $i_value) ; $i++ ) {
//echo 'Binding: {:'.$this->_field[$i] .'} as {'. $this->_value[$i]."}\n";
$this->_stmt->bindValue( ':'.$this->_field[$i], $this->_value[$i] );[/code]
Does anyone have an idea what my problem might be?
It's been working great until I added checkboxes in the fields. The column "sok" wich I changed from being a select gets the value "Array" in the mysql db. I dont remember when i downloaded the files but the .js says its version 1.22.
this is my response in firebug when posting my edit
[quote]
Notice: Array to string conversion in dataTables/php/lib/Database/Driver/Mysql/Query.php on line 78
{"id":"row_6","error":"","fieldErrors":[],"data":[],"row":{"DT_RowId":"row_6","process":"Verksamhetsstyrning","handling":"wertwer","sok":"Array","lagringsplats":"Dokumenthanteringssystem","bevaras":"7 \u00e5r","kommentar":"ererwt"}}[/quote]
with this as post data
[quote]action edit
data[bevaras] 7 år
data[handling] wertwer
data[kommentar] ererwt
data[lagringsplats] Dokumenthanteringssystem
data[process] Verksamhetsstyrning
data[sok][] Upphandlingsnummer
data[sok][] Fastighetsbeteckning
id row_6
table [/quote]
the last line in this code gets the error
[code]protected function _prepare( $sql )
{
$this->_stmt = $this->_dbcon->prepare( $sql );
// bind values
for ( $i=0 ; $i_value) ; $i++ ) {
//echo 'Binding: {:'.$this->_field[$i] .'} as {'. $this->_value[$i]."}\n";
$this->_stmt->bindValue( ':'.$this->_field[$i], $this->_value[$i] );[/code]
Does anyone have an idea what my problem might be?
This discussion has been closed.
Replies
http://editor.datatables.net/fields/#checkbox
Regards,
Allan
If someone else who's not that great at coding finds this on google, just add
[code]"separator": "|"[/code]