Raised This Month: $ Target: $400
 0% 

Concatenation of strings (putting two strings together)?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
OldWolf
Member
Join Date: Mar 2009
Old 04-11-2009 , 02:23   Concatenation of strings (putting two strings together)?
Reply With Quote #1

Howdy all,

I'm sure this is a no brainer, but I'm stumped:

I'm looping through a folder of maps. As each map is verified to be a legit map, I want to add it to a string in the following format (it's SQL if you're curious):

Code:
[some sql code will be here starting the string off, but it's not relevant]
('de_dust', 'foo', 'bar'),
('de_dust2', 'foo2', 'bar'),
('some_other_map', 'foo2', 'bar'),
('more_maps', 'foo2', 'bar'),
('zm_mansion', 'fooiest', 'bariest')
[The new lines aren't really in there, that was just to make it easier to see what I meant]

So where I stand right now is that I have the name of the map in a variable, and I can use the format function to put that name into the format of ('map_name', 'extra_value1', 'extra_value2')

Now, how do I add them to the existing list so they become one long string of value sets like that, with each separated by a comma (the last one shouldn't have a comma after it)?


Thank you!!!
OldWolf is offline
 


Thread Tools
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


All times are GMT -4. The time now is 02:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode