single table with multiple primary keys + update error

single table with multiple primary keys + update error

nagy2200nagy2200 Posts: 1Questions: 0Answers: 0
edited February 2014 in Editor
Hi,
I have a single table with 3 primary keys - (one of which sadly is named 'id'). how can I set multiple fields as the primary key so updates and inserts can be done properly? I see a reference to setting $_ Primary key but I am unsure where / how to set it.

this is the error on update. The 3 primary fields are id,program,JOB_ID that are referenced as '110002108415-78-T1966.1058'
++++++++++++++++++++++++
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '110002108415-78-T1966.1058' for key 'PRIMARY'' in C:\Inetpub\wwwroot\INTRANET\MAPPER\php\lib\Database\Driver\Mysql\Query.php:98
Stack trace:..............
++++++++++++++++++++++++++++

Also, is it possible to rename the data field in the initial query for example 'id' as 'MyID' ? I am trying to standardize so this would be very helpful.

thanks in advance,

-m
This discussion has been closed.