In an insert statement, you don't need the "tml_list =" in the values set.

INSERT into tbl
(field_list)
VALUES
(valuelist)

so in your example
INSERT INTO        List_prac
(tbl_list)
VALUES
(<cfqueryparam value="#i#" cfsqltype="cf_sql_varchar">)


On 4/14/06, john holmes <[EMAIL PROTECTED]> wrote:
> Hi,
> I have an list that I need to insert into a mysql database and I am not quite 
> sure how to do it. Right now I take the list variable "#thiswillbemylist#" 
> and if I run a cfloop list to insert it but it just gets a null value in 
> database.
>
> The part of query to insert is this:
>
> <cfloop list="#thiswillbemylist#" index="i">
>     <cfquery name="listinsert" datasource="#rdatasource#" 
> username="#username#" password="#password#">
>         INSERT INTO        List_prac (tbl_list)
>         VALUES             (tbl_list = <cfqueryparam value="#i#" 
> cfsqltype="cf_sql_varchar">)
>     </cfquery>
>  </cfloop>
>
>
> Can someone help?
> Thanks
> John
>
>
>
> ---------------------------------
> Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates 
> starting at 1ยข/min.
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237732
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to