Jump to content

Posting a thread with SQL Queries


Recommended Posts

Posted

Hi, in IPB3 we used a couple queries to post a thread from an external application.

In IPB4 this isn't working the same way and it causes infinite redirect errors. This is the queries I've been trying to IPB4:
 

INSERT INTO forums_topics SET title=?, state='open', posts='0', starter_id=?, start_date = unix_timestamp(), last_poster_id=?, last_post = unix_timestamp(), starter_name=?, last_poster_name=?, poll_state='0', last_vote='0', views='0', forum_id=?, approved='1', author_mode='1', pinned='0', title_seo=?

INSERT INTO forums_posts SET author_id=?, author_name=?, ip_address='127.0.0.1', post_date=unix_timestamp(), post=?, new_topic='1', post_key=? 
UPDATE forums_posts SET topic_id=? WHERE pid=?
UPDATE forums_topics SET topic_firstpost=? WHERE tid=? 
UPDATE core_members SET member_posts=member_posts+1, member_last_post=unix_timestamp(), last_activity=unix_timestamp() WHERE member_id=?

What am I missing? Or is there a way I can post a thread using a HTML API?

Thanks

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...