Not sure what you're asking...
select * from users where name = 'me'
is valid where the name column is a text type
select * from users where userID = 3
is valid where the userID column is a numeric type, and
select * from eventlog where logtimestamp #createODBCDate(now())#
will get today's eventlog entries if the logtimestamp column is a date/time
field.
If you have a form field called (e.g.) "Form.Comments" and the comments
include a single quote:
insert into CommentLog (comment) values ('#Form.Comments#')
then CF is smart enough to "escape" the tick quotes by doubling them before
sending the query to the DBMS. For example, the actual insert might look
like this to the SQL engine:
insert into CommentLog (comment) values ('This site''s cool, dude!')
...Is this what you're asking?
Daryl
- Original Message -
From: "Bryan LaPlante" [EMAIL PROTECTED]
To: "[KCFusion List] (E-mail)" [EMAIL PROTECTED]
Cc: "[CF-Server List][E-Mail]" [EMAIL PROTECTED]
Sent: Thursday, February 01, 2001 4:51 PM
Subject: [KCFusion] CFQUERY and single quotes
I am having a problem with a textarea that I use to send queries through
CF
via the CFQUERY tag.
If I write a query that references a string value like [ select * from
users
where name = 'me' ] the database says syntax error or access violation. If
on the other hand the query goes [ select * from users where userID = 3 ]
then the query runs fine.
Has anyone else found a work-a-round for this?
Bryan LaPlante
816-347-8220
[EMAIL PROTECTED]
http://www.netwebapps.com
Web Development
__
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe mailto:[EMAIL PROTECTED]
To Unsubscribe mailto:[EMAIL PROTECTED]
__
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe mailto:[EMAIL PROTECTED]
To Unsubscribe mailto:[EMAIL PROTECTED]