• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit
0

I NEED HELP

Community Beginner ,
Sep 17, 2019 Sep 17, 2019

Copy link to clipboard

Copied

I need to combine  form and query codes but I couldnt make it.

This is my CFML codes

<cfform name="ADDADA" method="post" >
<table border="3">
<tr>
<td><strong>Musteri ID: </strong></td>
<td><input type="text" name="MHid" >
</td></tr><br>
<tr>
<td><strong>Musteri Hareket Aciklama: </strong></td>
<td><input type="text" name="MHaciklama"> </td></tr>
<br>

<tr>
<td><strong>Musteri Tipi: </strong></td>
<td><input type= "text" name="Mtipi"></td>
</tr>
</table>
<br><input type="submit" name="Kaydet" value="KAYDET">
</cfform>
<cfif IsDefined("form.MHid") and IsDefined("from.MHaciklama")>

<cfquery NAME="ADD" datasource= "DENEME" >

INSERT INTO musterihareketleri (MusteriID,Aciklama,MusteriTipi)
values (
<cfqueryparam cfsqltype="cf_sql_integer" value="#cfform.MHid#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#cfform.MHaciklama#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#cfform.Mtipi#">
)
</cfquery>
</cfif>
<cfquery name="ADD" datasource="DENEME">
select * from musterihareketleri ;

</cfquery>
<cfdump var="#ADD#">

 

Views

396

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 17, 2019 Sep 17, 2019

Copy link to clipboard

Copied

While there are various curious coding practices in your code we might ask about, as for your "problem", could it be just the mistaken "from" for "form" in:

 

IsDefined("from.MHaciklama")>

 

If that's not it, please tell us the exact error or unexpected result you're getting. 


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 17, 2019 Sep 17, 2019

Copy link to clipboard

Copied

thats the problem i dont get any error or unexpected reseult

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 17, 2019 Sep 17, 2019

Copy link to clipboard

Copied

Did you implement my suggested correction?

/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 17, 2019 Sep 17, 2019

Copy link to clipboard

Copied

yes i did now i have this error

The error occurred in C:/xampp/htdocs/coldfusion/cfusion/wwwroot/new 2.cfm: line 25
23 : 	INSERT INTO musterihareketleri (ACIKLAMA, MUSTERIID, MUSTERITIPI)
24 : 	values (
25 : 		<cfqueryparam cfsqltype="cf_sql_integer"" value="#cfform.MHid#">,
26 : 		<cfqueryparam cfsqltype="cf_sql_varchar" value="#cfform.MHaciklama#">,
27 : 		<cfqueryparam cfsqltype="cf_sql_varchar" value="#cfform.Mtipi#">

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 17, 2019 Sep 17, 2019

Copy link to clipboard

Copied

You will help us to show the actual error, not just where it points to. But I see a mistaken extra double quotes after the first "cf_sql_integer", at least in your last message (though not the first). 


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 17, 2019 Sep 17, 2019

Copy link to clipboard

Copied

thanks for your help you are very kind 
i found the error it was about the column names

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 17, 2019 Sep 17, 2019

Copy link to clipboard

Copied

LATEST
Glad you resolved things.

/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation