Allow user to add the new fields in the tables

dilipmathi

dilipmathi

@dilipmathi-IBnCNO Oct 26, 2024
Hi to all

How can we allow the user to add the new fields on the tables , with out do any application code change ? (meaning after they add the new field i don't want to change the application code to read that new fields)

How to achieve this?

Please help me

Thanks

Dilip

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • dilipmathi

    dilipmathi

    @dilipmathi-IBnCNO Jul 3, 2011

    Hi

    Any suggestions?

    Thanks

    Dilip
  • PraveenKumar Purushothaman

    PraveenKumar Purushothaman

    @praveenkumar-66Ze92 Jul 3, 2011

    If you have a numeric read of fields, then your code itself is wrong... In case of PHP and MySQL, what I do is,
        $res mysql_query("SELECT * FROM `table`");
        while (
    $dat mysql_fetch_row($res))
            
    // Display the rows.
    This way, it iterates through all the possible fields... 😀 Not just a set of fields you hard-coded... 😀
  • dilipmathi

    dilipmathi

    @dilipmathi-IBnCNO Jul 3, 2011

    Hi

    Thank you so much for your reply.

    When the user adding the new fields changing the table structure is a good idea?

    Or any other ways to achieve it?

    Please help me

    Thanks
  • PraveenKumar Purushothaman

    PraveenKumar Purushothaman

    @praveenkumar-66Ze92 Jul 3, 2011

    Changing the table structure is the WORST idea... BTW, what is your scenario, so that I can guide you... 😀
  • dilipmathi

    dilipmathi

    @dilipmathi-IBnCNO Jul 3, 2011

    Hi

    Thanks again for your reply

    If let say we have an contact information table with the following fields (First name , Last name) . The user wants to add an new field called Address.

    How to achieve the above scenario?

    Thanks

    Dilip
  • PraveenKumar Purushothaman

    PraveenKumar Purushothaman

    @praveenkumar-66Ze92 Jul 3, 2011

    Use joins... Have you heard of tags??? And BTW, for your particular query, I have sent you a link in your VM... How to use tags and stuff in database... 😀 Enjoy... 😀
  • dilipmathi

    dilipmathi

    @dilipmathi-IBnCNO Jul 3, 2011

    I have sent you a link in your VM... How to use tags and stuff in database... 😀 Enjoy... 😀
    How can i find it?

    Thanks
  • PraveenKumar Purushothaman

    PraveenKumar Purushothaman

    @praveenkumar-66Ze92 Jul 4, 2011

    Go to your profile... #-Link-Snipped-# And see the link.
  • dilipmathi

    dilipmathi

    @dilipmathi-IBnCNO Jul 4, 2011

    Hi

    Thank you much for your help. I got an idea to do that.

    Can you please share your ideas on this thread?

    #-Link-Snipped-#

    Thanks in advance

    Dilip
  • PraveenKumar Purushothaman

    PraveenKumar Purushothaman

    @praveenkumar-66Ze92 Jul 4, 2011

    Sure Dilip! 😀
  • PraveenKumar Purushothaman

    PraveenKumar Purushothaman

    @praveenkumar-66Ze92 Jul 4, 2011

    Dilip I posted there. Do check it out... And also, please read this excellent tutorial by GF... 😀
    #-Link-Snipped-# 😀
  • PraveenKumar Purushothaman

    PraveenKumar Purushothaman

    @praveenkumar-66Ze92 Jul 4, 2011

    I will be posting more information about CRM in my blog soon... 😀