Skip to main content
May 6, 2008
Question

Need to... double parse?

  • May 6, 2008
  • 1 reply
  • 337 views
Okay, I have an application that can change frequently, as such, I need to run a query that tells my main query what it needs to update. So one query provides the other all the fields it needs to update. The main query and function are attached. The Insert part works fine, but the values part isn't working. The output looks like
INSERT INTO moves(name, damage, type, accuracy, recoil, minlevel, price, Boxing, Wrestling, TaiKwonDo, Karate, Capoeria, SAMBO, Ninjitsu, KungFu, Kempo, Savate, KickBoxing, MuayThai, description ) VALUES ('Blah', '1', 'Wresting', '25', '13', '7', '5', '#form.Boxing#', '#form.Wrestling#', '#form.TaiKwonDo#', '#form.Karate#', '#form.Capoeria#', '#form.SAMBO#', '#form.Ninjitsu#', '#form.KungFu#', '#form.Kempo#', '#form.Savate#', '#form.KickBoxing#', '#form.MuayThai#', 'Test')

See how it is just plugging #form.Fightingstylename# instead of actually finding the value of that field. How can I make it actually find the value of the field it is creating? I hope this makes sense.
This topic has been closed for replies.

1 reply

Inspiring
May 6, 2008
Start with the evaulate() function.

Ninety percent of the time this type of logic can be rewritten to make
it simpler and not need this type of double evaluation.

May 6, 2008
Thanks for the info, I'll check into the evaluate function.
There probably is a better way to do this, but I'm a terrible programmer, so unless you have any better ideas, i think I'm gonna have to roll with it.