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

  • SEARCH
  • Home
  • 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 4335294
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:38:59+00:00 2026-05-21T10:38:59+00:00

1) In mysql engines, MyISAM Is Better Or InnoDB ? 2) i want programming

  • 0

1) In mysql engines, MyISAM Is Better Or InnoDB ?

2) i want programming a cms that it could add a post with multi category
how i must design my database to have a better performance with a few query ?

in php how can list posts which category for example = 1 ?

thank you

  • 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-05-21T10:39:00+00:00Added an answer on May 21, 2026 at 10:39 am

    1) If you need foreign keys relations on DB level use InnoDB else use MyISAM

    2) You can store all categories in one table with schema like that

    create table categories (
    Category_ID int NOT NULL,
    ParentCategory_ID int NOT NULL default 0,
    CategoryName varchar(150)
    );
    

    with Category_ID primary key

    3)

    $sql = select * from posts where category_id = 1;
    mysql_query($sql);
    

    edit : Schema of post table (example)

    create table posts (
        Post_ID int NOT NULL,
        Category_IDs varchar(50) NOT NULL,
        POSTDescription varchar(1000),
        POSTTime int NOT NULL
    )
    

    Post_ID is primary key of posts table.

    note the Category_IDs is now varchar store value of categories in it like 1,2,3 if your post belongs to cateory 1,2 and 3.. and for deleting all posts belonging to category 1 you will run following query

    $sql = DELETE
    FROM `posts`
    WHERE FIND_IN_SET( '1', `Category_IDs` ) >0;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using mysql database, innoDB and MyISAM both engines. I want to see
My MySQL database contains several tables using different storage engines (specifically myisam and innodb).
We're using MySQL with Innodb Engine storage. We have an evented environment that sends
How do you configure Django for full-text search with MySQL-InnoDB. MySQL Myisam engine supports
In my MySQL installation I have one InnoDB database that I know will grow
I want to know the current size of my MySql DB, to get that
There's 10 million articles out there comparing MyISAM to InnoDB (two so-called database engines
We use MYSQL InnoDB engine for insert and update operations, in order to improve
I am using Engine InnoDB on my MySQL server. I have a patch script
I have a mysql DB configured with the innoDB storage engine. I dropped the

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.