Primary key 2 columns

Primary key 2 columns

mm789000mm789000 Posts: 25Questions: 2Answers: 0

Hi,

I have table ( order_line ) with a primary key with 2 columns ( order id and line ).
I add the primary key in server script like this :
Editor::inst( $db, 'order_line',array('id_order', 'line') )

But when i update a single row, it update all rows from the order_id.
It's like the primary key is not take place.

Any idea ?

Replies

  • mm789000mm789000 Posts: 25Questions: 2Answers: 0

    Hi,

    Solved with :
    Editor::inst( $db, 'order_line',array('order_line.id_order', 'order_line.line') )

  • allanallan Posts: 63,630Questions: 1Answers: 10,488 Site admin

    That's interesting - the table prefix shouldn't actually be needed due to this function. What version of the PHP libraries are you using?

    Thanks,
    Allan

  • mm789000mm789000 Posts: 25Questions: 2Answers: 0

    Hi,

    You mean datatable librairies ?

    Regards

  • allanallan Posts: 63,630Questions: 1Answers: 10,488 Site admin

    The server-side PHP libraries for Editor. If you look in Editor.php you'll find a "version" parameter for the class.

    Allan

Sign In or Register to comment.