Re: Replacing a Word

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 24404
interpreted = N
texte = Anup Setty wrote:> Hi, > Can anyone help me with this problem? > I need to write the data from a textarea into the database, while > I am doing that, I want to replace a word with an html tag. > The text from the textarea has [image] and when I write in the > database I want it replaced by > > [image] = > > thanks > > anup > > ------------------------------------------------------------- > Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. > To end your Mail problems go to . > > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to This is tough, since Webcat has no true string manipulation tools. Assuming there is no more than one occurance of [image] in any given field, this should work:I assume your database is named database.db, the field it is to be written to is called field, and your string is currently stored in a textvariable called [text]variable[/text][text show=f]appended=yes[/text] [showif [text]variable[/text]^[raw][image][/raw]] [append db=database.db]field=[middle startafter=&endbefore=[raw][image][/raw]][text]variable[/text][/middle][middle startafter=[raw][image][/raw]&endbefore=][text]variable[/text][/middle][/append] [text show=f]appended=yes[/text] [/showif] [showif [text]appended[/text]=no] [append db=database.db]field=[text]variable[/text][/append] [/showif]If a variable could contain more than one instance of [image], something much more complex would be required. Contact me if you require this, and I'll have a look.Good luck,Derrick ------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Associated Messages, from the most recent to the oldest:

    
  1. Re: Replacing a Word (Anup Setty 1999)
  2. Re: Replacing a Word (Brian Boegershausen 1999)
  3. Replacing a Word (Anup Setty 1999)
  4. Re: Replacing a Word (Anup Setty 1999)
  5. Re: Replacing a Word (Rob Marquardt 1999)
  6. Re: Replacing a Word (Anup Setty 1999)
  7. Re: Replacing a Word (Derrick Puckett 1999)
  8. Re: Replacing a Word (Derrick Puckett 1999)
  9. Re: Replacing a Word (Jesse Williams Proudman 1999)
  10. Re: Replacing a Word (Derrick Puckett 1999)
  11. Replacing a Word (Anup Setty 1999)
Anup Setty wrote:> Hi, > Can anyone help me with this problem? > I need to write the data from a textarea into the database, while > I am doing that, I want to replace a word with an html tag. > The text from the textarea has [image] and when I write in the > database I want it replaced by > > [image] = > > thanks > > anup > > ------------------------------------------------------------- > Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. > To end your Mail problems go to . > > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to This is tough, since Webcat has no true string manipulation tools. Assuming there is no more than one occurance of [image] in any given field, this should work:I assume your database is named database.db, the field it is to be written to is called field, and your string is currently stored in a textvariable called [text]variable[/text][text show=f]appended=yes[/text] [showif [text]variable[/text]^[raw][image][/raw]] [append db=database.db]field=[middle startafter=&endbefore=[raw][image][/raw]][text]variable[/text][/middle][middle startafter=[raw][image][/raw]&endbefore=][text]variable[/text][/middle][/append] [text show=f]appended=yes[/text] [/showif] [showif [text]appended[/text]=no] [append db=database.db]field=[text]variable[/text][/append] [/showif]If a variable could contain more than one instance of [image], something much more complex would be required. Contact me if you require this, and I'll have a look.Good luck,Derrick ------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Derrick Puckett

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

wee problem (2001) WebCat2 - [format thousands] (1997) Setting a range in a search (1998) Search-context (1999) Using Eudora instead of Emailer, and cron facility (1998) WC2.0 Memory Requirements (1997) Serving images from databases (1998) [WebDNA] Version 7 Config problem (2011) Uh...can someone help me out with the b10? (1997) Can this be done? (1997) WebDNA-Talk Digest mode broken (1997) Mac WebCat 4.0 Day Planner Hang (2000) Strange intermittent WebDNA problems (2008) RE:It just Does't add up!!! (1997) Encrypting WebDNA Templates and eligible files (1999) 2.0.1 new commands and contexts (1997) emailer stuck (1997) Date and Time Math (1997) remove line item (2000) Is using [URL] recommended even on an email address? (1999)