Page is a not externally linkable
sanji41 - 10:52 pm on Jul 30, 2010 (gmt 0)
well, im creating a tutorial site. so i'm not quite sure how the comment form and post tutorial work(database relationship)basically if i post a tutorial, comment form will be there too.my question is how can i call the two tables and every comment for the said tutorial should be inserted for that post only..
here it is:
POST TUTORIAL 1 = COMMENT 1 > every comment for this post only.
POST TUTORIAL 2 = COMMENT 2 > every comment for this post 2.
here is my query:to call them>
$query = "SELECT *FROM tutorials INNER JOIN comment on tutorials.title = comment.tutorialsid_fk ORDER by tutorials.id DESC";
here is to insert them:
$myquery = sprintf("INSERT into tutorials(title, content, author, Sentdate) VALUES ('%s', '%s', '%s', '%s')",
$myquery ="INSERT into comment (tutorialsid_fk) values (\"$id1\")";