WordPress.org

Ready to get started?Download WordPress

Forums

how to create tables to store data (9 posts)

  1. imhameed78
    Member
    Posted 3 years ago #

    hi,
    i am new to WP and wanted to know if i can add few tables to store some data about products. do i need a new database or can i just add my tables to wp database.
    any help would be appreciated.
    regards

  2. kureikain
    Member
    Posted 3 years ago #

    Yesm you maybe need to add extra table when working with plugin!
    But the first, try to use custom field first, or use custom post type!
    If nothing fit to your purpose go with some article like this:
    http://codex.wordpress.org/Creating_Tables_with_Plugins

  3. imhameed78
    Member
    Posted 3 years ago #

    thanks for urs help

  4. Mike Schinkel
    Member
    Posted 3 years ago #

    @imhameed78 - I highly recommend you at least first consider using Custom Post Types:

    Custom Post Types sounds to be exactly like what you will really want to be using instead of (a) custom table(s). You'll get lots of features "for free" with CPTs and in general it's considered bad form to add tables to a WordPress' database until there is no other option.

    Hope this helps.

    -Mike

  5. imhameed78
    Member
    Posted 3 years ago #

    HI,

    Thanks for all the help.

    Here is exactly what i wanted to do.

    I needed to work on a website about mobiles. So, i need to store data about mobile's brand, features, price etc. I need to give backend to the site Admin to do the data enteries like Mobile's Brand, Mobile's Name, Price, Camera resolution and all of its features, and on the frontend the users should be able to search by Brand, Mobile's Name, Price or any of Mobile features. I have done a similar website using ASP and SQL server, so using tables, but have no idea how to deal this stuff in WP.

    Regards

  6. Mike Schinkel
    Member
    Posted 3 years ago #

    @imhameed78 - Please take a look at the link I posted (here it is again):

    - Custom Post Types in WordPress 3.0

    If you'd like a detailed follow up with screenshots and formatted source code (which is respectively impossible and much harder to do here on the WordPress support forums), consider posting your question here:

    - http://wordpress.stackexchange.com/

    Also, if you do ask questions over there I'd consider breaking up your questions into bite-sized pieces, i.e. how to add brands, how to add products, how to implement search and so on.

    BTW, I worked for 10 years with ASP + SQL Server before switching to Drupal and then to WordPress so I know what you worked with; CPTs are definitely the way to go for your stated needs.

    Hope this helps.

    -Mike

  7. imhameed78
    Member
    Posted 3 years ago #

    Thanks a lot for ur help. I really appreciate your help Mike.

  8. Mike Schinkel
    Member
    Posted 3 years ago #

    @imhameed78 - Glad I could help.

  9. imhameed78
    Member
    Posted 3 years ago #

    Thanks Mike, found this link very useful http://net.tutsplus.com/tutorials/wordpress/rock-solid-wordpress-3-0-themes-using-custom-post-types/

    found it on the link u provided.
    regards

Topic Closed

This topic has been closed to new replies.

About this Topic