This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Help with mysql syntax

Old posts that have not been replied to for several years.
Locked
d
danjuls

Help with mysql syntax

Post by danjuls »

Ive finally got mysql to work with the newest eggdrop but now im having trouble with the mysql syntax.
Im trying to run infobot.tcl by eruptor but since his installation of tables doesnt work i have built them myself but no comes the hard part.
There is something wrong with some of the syntax cause i cant add it to mysql.

Code: Select all

sql "insert into field_api VALUES('affils','insert','if {!\[regexp {\[02468\]} \[string index \[llength \[list %vars%\]\] \[expr \[llength \[list %vars%\]\] - 1\]\]\]} { set return -1 }','Groupnames must all have hq postitions paired with them.')"
  sql "insert into field_api VALUES('affils','view','set count 0 \; while {\$count<\[llength \[list %vars%\]\]} { append return \[lindex \[list %vars%\] \$count\](\[lindex \[list %vars%\] \[expr \$count + 1\]\]) \; incr count 2 }','')"
Ive even tried to deleate all the \ infron of everything but icant make mysql to accept this code..

Any ideas?
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Yeah... break it up into chunks that are actually readable?

Also, use { } instead of " " so that you don't have to escape chars like $ and [.

Finally, it would help if you said what the syntax error actually is?
Locked