Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I need to make inquries from my new website. I want to know whether Wordpress is capable of this:

Say it I have such a table:

CREATE TABLE IF NOT EXISTS `mytable` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `base_id` int(11) NOT NULL,
  `page_type` smallint(4) NOT NULL,
  `page_title` varchar(50) NOT NULL,
  `page_content` text NOT NULL,
  `previous_id` int(11) NOT NULL,
  `next_positive_id` int(11) NOT NULL,
  `next_negative_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;  


id..base_id..page_type..page_title..page_content..previous_id...next_positive_id..next_negative_id
1..1..question...."Character test"..."Do you like cats"....0....2....3
2..1..middle question.."Character test"...."Do you like dogs"....1....4....5

First question is "Do you like cats". This is "page content". Page title is "Character test". If user selects yes, he is redirected to page 4, if no then redirected to page 5.

Page titles, questions, next page's links etc. will be taken from the database table. I put a flow example below. Is it possible to make this in Wordpress ? I need to change only database entries and then the site content wil be updated automatically. Thank you

enter image description here

share|improve this question
add comment

1 Answer

Wordpress does not have relationship support among the posts. So for you to do that you have create a new table to store the post id and the linked post id. You need to do custom query every time that table needs to be updated.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.