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,532
Likes: 150
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,532
Likes: 150
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
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,532
Likes: 150
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,532
Likes: 150
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
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
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
Are any of these legitmate?
by Baldeagle - 09/06/2026 1:37 PM
After server reboot
by Morgan - 09/02/2026 8:27 AM
8.0.1 Patch Changelog Discussion
by isaac - 11/26/2025 1:34 PM
Who's Online Now
0 members (), 381 guests, and 101 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)