Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

How to print query from database in ColdFusion

coldfusion

  • Please log in to reply
3 replies to this topic

#1 mutago

mutago

    CC Devotee

  • Senior Member
  • PipPipPipPipPipPip
  • 478 posts

Posted 14 October 2011 - 12:40 PM

Good day everyone, am trying to get the value of my product price and print it from database
but I couldn't in coldfusion. I can only do it in php.
below is the work thanks
<cfset price=0>


<cfquery name="testing" datasource="mydsn">
SELECT price FROM product;
</cfquery>


<cfoutput><b>Your price is</b>#price#<br>
</cfoutput> 

  • 0

#2 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 14 October 2011 - 04:10 PM


<cfset price=0>

<cfquery name="testing" datasource="mydsn">

 SELECT price FROM product;

 </cfquery>



<cfoutput>

<b>Your price is</b>#testing.price#<br>

 </cfoutput>


  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#3 mutago

mutago

    CC Devotee

  • Senior Member
  • PipPipPipPipPipPip
  • 478 posts

Posted 15 October 2011 - 01:13 PM

Thanks, you are the greatest
  • 0

#4 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 15 October 2011 - 02:29 PM

ColdFusion is one of the languages I get paid to work with :) It's kind of rare to see someone learning it.

ColdFusion has a few concepts that are kind of different from other languages, but you'll get it.
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/






Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download