Hmmm...too bad you wrote all that before you tried it. :) On 4/14/06, S. Isaac Dealey <[EMAIL PROTECTED]> wrote: > > I don't think that will work with an insert statement. The standard > for SQL insists on one value per column for inserts and updates. It's > only IN and NOT IN constructs in where clauses where comma separated > lists are allowed. In an insert statement with only one column in the > table, a comma in the values list should produce a "too many values" > or "number of values does not match number of columns" error message. > > > John, > > > You also don't need the loop. Just add list="yes" inside > > your cfqueryparam. > > > Dina > > > > On 4/14/06, john holmes <[EMAIL PROTECTED]> wrote: > >> > >> That surely was it, thank you. > >> > >> Jerry Johnson <[EMAIL PROTECTED]> wrote: 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 > >> () > >> > >> > >> On 4/14/06, john holmes 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: > >> > > >> > > >> > > >> > INSERT INTO List_prac (tbl_list) > >> > VALUES (tbl_list = ) > >> > > >> > > >> > > >> > > >> > 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:237839 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54