Previous Thread
Next Thread
Print Thread
Hop To
#251140 12/07/2012 12:53 PM
Joined: Sep 2004
Posts: 152
Y
member
member
Y Offline
Joined: Sep 2004
Posts: 152
Hi all,

I"m familiar with MySQL, but not with the quirks of the db tables used in UBB.threads. I need a quick, safe and easy SQL instruction for creating a new topic with topic name $topicname and message $message, posted by userid x (x being the number of said user in the db table), assuming the connection with the database has already been established by my PHP script.

I need this to automatically generate topics based on events elsewhere in the script.

The topic table has quite some columns, but I'm not sure which are optional and which are updated automatically (it seems I need two instructions: one for creating the topic and one for creating the first message in it).

Any help would be much appreciated!

Last edited by Yomar; 12/07/2012 12:59 PM.
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
Go to UBBDev and grab the "RSS Topic Creator" mod, it'll have just about anything you'd need to insert a topic (though it doesn't populate the active topics portion of the forum).


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Sep 2004
Posts: 152
Y
member
member
Y Offline
Joined: Sep 2004
Posts: 152
Thank you Gizmo! I ripped your code apart and found exactly the statements I needed... it's working now!

Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
You are most welcome


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
spam issues
by ECNet - 03/19/2024 11:45 PM
Who's Online Now
2 members (Gizmo, Nightcrawler), 791 guests, and 189 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)