House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

ColdFusion and mySQL

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Hmmmm.....
Mark A. Kruger - CFG
12/03/02 11:04 A
Yes I'm sure.
FlashGuy
12/03/02 11:13 A
Shoot - well, I'm out of ideas <g>.
Mark A. Kruger - CFG
12/03/02 11:32 A
Quoting FlashGuy <flashmx@rogers.com>:
Jochem van Dieten
12/03/02 11:10 A
FlashGuy wrote:
Jochem van Dieten
12/03/02 04:05 P
do any of the variables contain "\"
Robertson-Ravo, Neil (RX)
12/03/02 10:37 A
Hi,
Eric Guesdon
12/03/02 10:56 A
Got it.
FlashGuy
12/03/02 11:22 A
erm, what version of mySQL?
Robertson-Ravo, Neil (RX)
12/03/02 11:29 A
what was it?
Robertson-Ravo, Neil (RX)
12/03/02 11:39 A
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
FlashGuy
12/03/2002 10:21 AM

There is something wrong with my syntax. I just converted my Access database over to mySQL. Whats wrong with the <cfqueryparam>? I get "?" question marks inserted into the database when I execute the updated code. Before: --------- <cfquery name="update_alias" DATASOURCE="Alias"> Insert into alias (env_var, destination) VALUES ('#FORM.env_var#', '#FORM.destination#') </cfquery> After: ------- <cfquery name="update_alias" DATASOURCE="Alias"> Insert into alias (env_var, destination) VALUES ('<cfqueryparam value="#FORM.env_var#" cfsqltype="CF_SQL_LONGVARCHAR">', '<cfqueryparam value="#FORM.destination#" cfsqltype="CF_SQL_LONGVARCHAR">') </cfquery> --------------------------------------------------- Colonel Nathan R. Jessop Commanding Officer Marine Ground Forces Guatanamo Bay, Cuba ---------------------------------------------------

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mike Townend
12/03/2002 10:33 AM

Do you actually get the "?" inserted into the DB or does the Query debug show a ?.... ? There is something wrong with my syntax. I just converted my Access database over to mySQL. Whats wrong with the <cfqueryparam>? I get "?" question marks inserted into the database when I execute the updated code. Before: --------- <cfquery name="update_alias" DATASOURCE="Alias"> Insert into alias (env_var, destination) VALUES ('#FORM.env_var#', '#FORM.destination#') </cfquery> After: ------- <cfquery name="update_alias" DATASOURCE="Alias"> Insert into alias (env_var, destination) VALUES ('<cfqueryparam value="#FORM.env_var#" cfsqltype="CF_SQL_LONGVARCHAR">', '<cfqueryparam value="#FORM.destination#" cfsqltype="CF_SQL_LONGVARCHAR">') </cfquery> --------------------------------------------------- Colonel Nathan R. Jessop Commanding Officer Marine Ground Forces Guatanamo Bay, Cuba ---------------------------------------------------

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
FlashGuy
12/03/2002 10:49 AM

I actually get the "?" inserted into my two fields in the database. ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mark A. Kruger - CFG
12/03/2002 10:46 AM

hehe..... Get rid of the single quotes around your <cfqueryparam> it should NOT be: ('<cfqueryparam value="#FORM.env_var#" cfsqltype="CF_SQL_LONGVARCHAR">', it SHOULD be (<cfqueryparam value="#FORM.env_var#" cfsqltype="CF_SQL_LONGVARCHAR">, You are inserting the placeholder. -Mark There is something wrong with my syntax. I just converted my Access database over to mySQL. Whats wrong with the <cfqueryparam>? I get "?" question marks inserted into the database when I execute the updated code. Before: --------- <cfquery name="update_alias" DATASOURCE="Alias"> Insert into alias (env_var, destination) VALUES ('#FORM.env_var#', '#FORM.destination#') </cfquery> After: ------- <cfquery name="update_alias" DATASOURCE="Alias"> Insert into alias (env_var, destination) VALUES ('<cfqueryparam value="#FORM.env_var#" cfsqltype="CF_SQL_LONGVARCHAR">', '<cfqueryparam value="#FORM.destination#" cfsqltype="CF_SQL_LONGVARCHAR">') </cfquery> --------------------------------------------------- Colonel Nathan R. Jessop Commanding Officer Marine Ground Forces Guatanamo Bay, Cuba ---------------------------------------------------

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
FlashGuy
12/03/2002 10:53 AM

I did and I still get "?" inserted in the database? <cfquery name="update_alias" DATASOURCE="Alias"> UPDATE alias SET env_var = <cfqueryparam value="#FORM.env_var#" cfsqltype="CF_SQL_LONGVARCHAR">, destination = <cfqueryparam value="#FORM.destination#" cfsqltype="CF_SQL_LONGVARCHAR"> WHERE alias_ID = #FORM.alias_ID# </cfquery> ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mark A. Kruger - CFG
12/03/2002 11:04 AM

Hmmmm..... Are you sure. Delete them all manually and try again. I did and I still get "?" inserted in the database? <cfquery name="update_alias" DATASOURCE="Alias"> UPDATE alias SET env_var = <cfqueryparam value="#FORM.env_var#" cfsqltype="CF_SQL_LONGVARCHAR">, destination = <cfqueryparam value="#FORM.destination#" cfsqltype="CF_SQL_LONGVARCHAR"> WHERE alias_ID = #FORM.alias_ID# </cfquery> > hehe..... Get rid of the single quotes around your <cfqueryparam> it should ----- Excess quoted text cut - see Original Post for more ----- database ----- Excess quoted text cut - see Original Post for more ----- cfsqltype="CF_SQL_LONGVARCHAR">') ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
FlashGuy
12/03/2002 11:13 AM

Yes I'm sure. I removed the "env_var = <cfqueryparam value="#FORM.env_var#" cfsqltype="CF_SQL_LONGVARCHAR">" and put it back the way I had it before to "env_var = '#FORM.env_var#'. Now this field gets inserted properly but the "destination = <cfqueryparam value="#FORM.destination#" cfsqltype="CF_SQL_LONGVARCHAR">" gets inserted as a "?" It has to be the syntax of the SQL statement? I'm using the <cfqueryparam on another database and it works great. ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mark A. Kruger - CFG
12/03/2002 11:32 AM

Shoot - well, I'm out of ideas <g>. Yes I'm sure. I removed the "env_var = <cfqueryparam value="#FORM.env_var#" cfsqltype="CF_SQL_LONGVARCHAR">" and put it back the way I had it before to "env_var = '#FORM.env_var#'. Now this field gets inserted properly but the "destination = <cfqueryparam value="#FORM.destination#" cfsqltype="CF_SQL_LONGVARCHAR">" gets inserted as a "?" It has to be the syntax of the SQL statement? I'm using the <cfqueryparam on another database and it works great. ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Jochem van Dieten
12/03/2002 11:10 AM

Quoting FlashGuy <flashmx@rogers.com>: ----- Excess quoted text cut - see Original Post for more ----- Can you show us the query debug output? And you really should convert that last pass through variable into a cfqueryparam too. Jochem

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
FlashGuy
12/03/2002 11:18 AM

On Tue,  3 Dec 2002 17:00:38 +0100, Jochem van Dieten wrote: ----- Excess quoted text cut - see Original Post for more ----- Even if the variable won't ever contain a "\" like the destination field? > > Jochem

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Jochem van Dieten
12/03/2002 04:05 PM

FlashGuy wrote: ----- Excess quoted text cut - see Original Post for more ----- Yes, always (see list archives and MM knowledgebase for the reasons). And if you still have the problem, send the debug output. Jochem

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Robertson-Ravo, Neil (RX)
12/03/2002 10:37 AM

do any of the variables contain "\" There is something wrong with my syntax. I just converted my Access database over to mySQL. Whats wrong with the <cfqueryparam>? I get "?" question marks inserted into the database when I execute the updated code. Before: --------- <cfquery name="update_alias" DATASOURCE="Alias"> Insert into alias (env_var, destination) VALUES ('#FORM.env_var#', '#FORM.destination#') </cfquery> After: ------- <cfquery name="update_alias" DATASOURCE="Alias"> Insert into alias (env_var, destination) VALUES ('<cfqueryparam value="#FORM.env_var#" cfsqltype="CF_SQL_LONGVARCHAR">', '<cfqueryparam value="#FORM.destination#" cfsqltype="CF_SQL_LONGVARCHAR">') </cfquery> --------------------------------------------------- Colonel Nathan R. Jessop Commanding Officer Marine Ground Forces Guatanamo Bay, Cuba ---------------------------------------------------

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
FlashGuy
12/03/2002 10:50 AM

Yes, the "FORM.destination" but thats the reason for the "<cfqueryparam value="#FORM.destination#" cfsqltype="CF_SQL_LONGVARCHAR">" Yet the "?" are being inserted. ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Eric Guesdon
12/03/2002 10:56 AM

Hi, I don't know how your access database was built but it seams your problem come from encoding. Access is Unicode compatible and MySql doesn't I use the same couple of techno - Flash - CFMX - MySql I have had to insert each special with urlFncodedFormat function Best regards Eric -----Message d'origine----- De : Robertson-Ravo, Neil (RX) [mailto:Neil.Robertson-Ravo@csd.reedexpo.com] Envoyé : mardi 3 décembre 2002 16:26 À : CF-Talk Objet : RE: CF and mySQL do any of the variables contain "\" There is something wrong with my syntax. I just converted my Access database over to mySQL. Whats wrong with the <cfqueryparam>? I get "?" question marks inserted into the database when I execute the updated code. Before: --------- <cfquery name="update_alias" DATASOURCE="Alias"> Insert into alias (env_var, destination) VALUES ('#FORM.env_var#', '#FORM.destination#') </cfquery> After: ------- <cfquery name="update_alias" DATASOURCE="Alias"> Insert into alias (env_var, destination) VALUES ('<cfqueryparam value="#FORM.env_var#" cfsqltype="CF_SQL_LONGVARCHAR">', '<cfqueryparam value="#FORM.destination#" cfsqltype="CF_SQL_LONGVARCHAR">') </cfquery> --------------------------------------------------- Colonel Nathan R. Jessop Commanding Officer Marine Ground Forces Guatanamo Bay, Cuba ---------------------------------------------------

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Robertson-Ravo, Neil (RX)
12/03/2002 11:00 AM

doesn't mySQL use \ for something internally? I had a problem with it ages back.... can't remember what it was though! Yes, the "FORM.destination" but thats the reason for the "<cfqueryparam value="#FORM.destination#" cfsqltype="CF_SQL_LONGVARCHAR">" Yet the "?" are being inserted. > do any of the variables contain "\" > There is something wrong with my syntax. I just converted my Access database ----- Excess quoted text cut - see Original Post for more ----- cfsqltype="CF_SQL_LONGVARCHAR">') ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
FlashGuy
12/03/2002 11:14 AM

Correct. Thats the reason for the <cfqueryparam...> ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
S. Isaac Dealey
12/03/2002 11:26 AM

I don't use mySQL but I remember someone saying \ is an escape character... <cfqeuryparam> will allow you to put \ in a varchar field in mySQL however. It's in one of the threads in the cf-talk archive. ----- Excess quoted text cut - see Original Post for more -----

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Robertson-Ravo, Neil (RX)
12/03/2002 11:29 AM

erm, what version of  mySQL? Correct. Thats the reason for the <cfqueryparam...> ----- Excess quoted text cut - see Original Post for more -----

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group

<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 18, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference