Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 How to give a field a default value
JimR Offline
Junior Member
**
Posts: 15
Joined: Jun 2012
Post: #9
RE: How to give a field a default value
(03-01-2013 01:46 PM)ZiNgA BuRgA Wrote:  Okay, I think I might be understanding you a bit more...
Is it the case that you already have a bunch of threads, but don't have this data set in the thread fields (ie you installed XThreads (or created the thread fields) after the threads were posted)?  If so, then you'd want to enter the data into all the thread fields, either manually or using a script (that just fills the database rows).  Doing anything to editpost makes no sense here.

Otherwise the Default Value will not appear on editpost, since it ultimately is just a default that gets entered when creating a thread.  When you've already got a thread, the value has been explicitly set by the thread, so a default makes no sense.

Yes I have 65000 threads that I created with a script (I did forget to populate threadfields_data table Ouch ) so is the best answer to create a script that just adds the data I want to the threadfields data table ? Rather than the way I looked at it which was to display the data (if there was no record in threadfields_data table) or add the data if someone edits the post.
03-02-2013 02:40 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
How to give a field a default value - JimR - 02-26-2013, 05:11 AM
RE: How to give a field a default value - JimR - 03-02-2013 02:40 AM

 Standard Tools
Forum Jump: