Reputation: 2799
i am a new learner of php, now, i want to write a guestbook. but i don't know how to design the guestbook database. expect someone can give me some datails about it. the guestbook table i want to be (guest message, admin reply guest message,guest info). how to design these tablle's fields.
Upvotes: 0
Views: 516
Reputation: 12843
It seems like you don't have a clear picture of what you want. That makes it hard to offer any usable advice.
There are plenty of sites offering free guestbooks (php/mysql). You can download the code and dissect it to learn from it and get ideas for your own guestbook.
For example, HotScripts have listed 395 guestbooks.
Have a look and come back with a more specific question, and I promise that people will help you with specific problems.
Upvotes: 2
Reputation: 13843
At this point, its very unclear. With the information you have provided, all I can say is if you want to create a guestbook tabble with the fields you mentioned, you can do it this way -
CREATE TABLE Guestbook (
guestbook_id int(11) default NULL auto_increment,
guestinfo varchar(60) default NULL,
guestmessage varchar(60) default NULL,
adminreply varchar(60) default NULL,
PRIMARY KEY (guestbook_id)
) TYPE=MyISAM
Upvotes: 1