Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Unique Primary Key

forums forums Unique Primary Key

  • This topic is empty.
Viewing 0 reply threads
  • Author
    Posts
    • #18906
      peterlaursen
      Participant

      QUOTE
      My question is therefore:- Is there a way to join the timestamp value with text and numeric data at insert time via php?

      there is absolutely no correlation between SQLyog an the scripting language php. But a PK can be built from several fields – just coneect to the database(s) with SQLyog and select the fields that you want to use for the PK from ALTER TABLE functionality.

      Myabe you can use something form this article

      http://www.webyog.com/forums/index.php?showtopic=1507

      there is a simple trick desribed here

      QUOTE
      If you want to be 100% sure that you don’t lose newly created data with the sync and also want to ensure that all data is synced you can build a PK composed of any field(s) that you would normally for a PK AND any other having different DEFAULT value on the two hosts. It doesn’t matter if that variable is a number-type and has defaults for instance “0” and “1” respectively or it’s a char-type having defaults for instance “webhost” and “localhost”. With this new PK “conflicting primary keys” will not occur during sync, since the same value for the PK would never exist on both hosts with data created since last sync. The host-specific part of such PK will always tell on which host the row was first created

Viewing 0 reply threads
  • You must be logged in to reply to this topic.