Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 28th November 2007, 23:28   #1
BerSerK6996
Junior Member
 
Join Date: Nov 2007
Posts: 9
Question String manipulation and loop problem

Hi,

I run a query on a mysql server and I get this return value :
code:
Tables_from_database (~tmp%)
~tmpclp481551
~tmpclp481552



I managed to clean this a bit to get :

code:
~tmpclp481551
~tmpclp481552



Those two strings are mysql tables that I need to "DROP" but I can't figure how to make some kind of loop to do it. I already know how to run my drop query, I mostly need help to work with the string and loop.

I bet it's simple but I just couldn't find anything in the manual, examples or Google.

Any help is much appreciated!
Thanks

Last edited by BerSerK6996; 29th November 2007 at 00:31.
BerSerK6996 is offline   Reply With Quote
Old 29th November 2007, 16:13   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,338
WordFind should the trick. It allows you to split strings.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 29th November 2007, 17:19   #3
BerSerK6996
Junior Member
 
Join Date: Nov 2007
Posts: 9
Thanks solved, I managed to avoid the loop by formatting my string like

code:
drop tables `table1`,`table2`


I used nsPerl to make all my string manipulation since I know more Perl than NSIS.

Thanks!
BerSerK6996 is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump