string concatenation with %s

Suliman via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jan 7 08:38:23 PST 2015


I need to construct complex SQL request, like:

string sql = ("INSERT INTO test.geomagnetic (`date`, 
`a_fredericksburg`, `fredericksburg`, `a_college`, `college`, 
`a_planetary`, `planetary`) VALUES ('%s', '%s', '%s', '%s', '%s', 
'%s', '%s');", date[i], a_fredericksburg[i], fredericksburg[i], 
a_college[i], college[i], a_planetary[i], planetary[i]);


I except that writefln have some behavior as string 
concatenation, but it does not.

IS there any way to put needed values in place of %s in string?


More information about the Digitalmars-d-learn mailing list