Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8894279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:27:21+00:00 2026-06-14T23:27:21+00:00

Im using CodeIgniters DBforge to use my database. Im trying to convert a plain

  • 0

Im using CodeIgniters DBforge to use my database.

Im trying to convert a plain PHP script to CodeIgniter and im having some trouble with changing the SQL to dbforge.

I have the following SQL code

CREATE TABLE `message2_recips` (
  `mid` int(10) unsigned NOT NULL,
  `seq` int(10) unsigned NOT NULL,
  `uid` int(10) unsigned NOT NULL,
  `status` char(1) NOT NULL default 'N',
  KEY `m2r1` USING BTREE (`mid`,`status`),
  KEY `m2r2` USING BTREE (`uid`,`status`)
) ENGINE=InnoDB;

Everything works fine except when i get to the 2 key values at the bottom.

Everything i have tried doesnt seem to work including,

$this->dbforge->add_key(array('mid', 'status'));
$this->dbforge->add_key(array('uid', 'status'));

Any help translating this would be greatly appreciated, i cant seem to find any way to input this using dbforge, which brings my project to a complete standstill

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T23:27:22+00:00Added an answer on June 14, 2026 at 11:27 pm

    Impossible to do (currently) via DB Forge – it doesn’t support additional options for table keys. You can only achieve that by adding them afterwards with raw SQL queries.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Codeigniter, I am trying to get a php script to run after a
I am using CodeIgniter to pass some parameters to my PHP page through $_POST
I'm using CodeIgniter, and I'm not able to use my database with it. I'm
I'm using codeigniter. Suddenly, for some reason, my application/config/config.php started loading twice. I have
I using codeigniter to trying add text in routes.php , What I want to
Possible Duplicate: PHP get both array value and array key I am using Codeigniters'
I'm using CodeIgniter 2.1 I use CodeIgniter's session to handle whether a user logged
I am using CodeIgniter to upload some files through a form. I know how
I'm using CodeIgniter (a PHP framework) to build an app, and I have an
using CodeIgniter normally one has to specify the controllers in the config/routes.php file. This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.