FlashGuy wrote:
>
> <cfquery name="qInsertData" DATASOURCE="results">
> Insert into myresults
> (strFileName, strCommand, strCreatedOn, strLastAcc, strLastMod, strSize,
> strDirectory, strDateCommand, strUsername)
> VALUES
> ('#Filename#', <cfqueryparam value="#strFilename#" cfsqltype="CF_SQL_LONGVARCHAR">)
> ('#FileCommand#', <cfqueryparam value="#strCommand#" cfsqltype="CF_SQL_LONGVARCHAR">)
>
> ...and so on...
>
> </cfquery>
> Is this the correct syntax?
No: http://www.mysql.com/doc/en/INSERT.html
<cfquery name="qInsertData" DATASOURCE="results">
INSERT INTO myresults (
strFileName,
strCommand,
strCreatedOn,
strLastAcc,
strLastMod,
strSize,
strDirectory,
strDateCommand,
strUsername
)
VALUES (
<cfqueryparam value="#strFilename#" cfsqltype="CF_SQL_LONGVARCHAR">,
<cfqueryparam value="#strCommand#" cfsqltype="CF_SQL_LONGVARCHAR">,
...,
...,
...,
...,
...,
...,
...
)
</cfquery>
> Is there an easier way?
No.
Jochem
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4