Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
creating unique field in table
  • \DBUtil::create_table();

    how to set one of the table fields to be unique...is there a parameter when adding fields or i have to use \DBUtil::create_index(), and if i have to use ::create_index(), do i have to make the field 1st in create_table()?
  • HarroHarro
    Accepted Answer
    You mean a UNIQUE INDEX on a non-primary key? Because primary keys are unique by default.

    If you need additional indexes, you need to use create_index().
  • yes thats what i mean...thank you

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion