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 8751913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:08:09+00:00 2026-06-13T13:08:09+00:00

Im writing web application based on database with many tables with many relations. For

  • 0

Im writing web application based on database with many tables with many relations.

For example i have table with [Items], which has many relations.

Each [Item] has one [Group]

Each [Item] has multiple [Ingredients]

Each [Ingredient] has one [Type]

My code is going out of control. I wrote “edit_item_record” form that is filled with fields like “name” or “id”, but i have problems with dropdowns and sub-items.

I dont know how to create form that has everything related with [Item] on one page (Name, Group, Ingredients). Submitting form like this may need multiple inserts or updates on many tables. How to handle this?

Does anyone saw any tutorial for CodeIgniter that describes how to design application bigger than blog with 1 table and 2 fields?

  • 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-13T13:08:11+00:00Added an answer on June 13, 2026 at 1:08 pm

    You’re not going to get this kind of thing through a tutorial, you need to take what you learned in the blog type tutorials and apply it to your situation. In my application simply adding a product can affect as many as 7 tables.

    This is more a question about workflow than anything. You need to sit down with a pen and a pad and map out how things work, how your tables relate and the flow to add the data. Before you start coding you need to understand how to add data, which tables require information from others before you can insert etc. Take for example a simple product, you have basic data in the product table and another table for product images. Obviously in this case you’d need to insert the product table first to get an id to add to the images table. Yes you are going to end up with multiple inserts, in fact when adding a new member my routine inserts to one table twice due to the way the data works.

    Take your time and map it out. This is a situation where no one tutorial is going to help, it’s about you looking at your tables and data flow logically and putting it together.

    As to putting all the data on one form that is the easy part. Simply pull the data in your controller using a query with joins. Something along these lines.

    Controller:

    $data['products'] = $this->product->getAllProductDetails($productId);
    

    Model:

    $this->db->where('productId',$productId);
    $this->db->join('product_images','product_images.productId=products.productId');
    $this->db->join('manufacturers','manufacturers.manufacturerId=products.productId');
    $this->db->get('products');
    

    The above would pull all the product, product images and manufacturer information into the variable $products for you to use in your view. Then on your save button you would have another controller function that would individually call saves (insert or update, personally I have a save function that decides which is required) for each of those tables

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

Sidebar

Related Questions

I'm writing a web based application that will have its own authorization/authentication mechanism (traditional
I'm writing a PHP-based web application that should work with multiple database systems. The
Working with the Google Web Toolkit i have written an application which is based
I'm writing a web based application (large cargo aircraft weight and balance) in which
I have an android application that has a background service which polls a web
When writing a web application which allows the upload of files, one must be
I'm writing a web application that connects to a database. I'm currently using a
I'm writing a web application which contains a kind of schedule. After a certain
I am writing a web based application using Ruby on Rails. In one of
I'm writing web chat application, similar to GTalk. It based on Orbited + Sinatra

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.