Cyber Information

November 17, 2009

How to select table from database using CFM

After our lesson I learn something on how to connect your CFM statement to the databse. This is a simple statement that being use in Coldfusion language. This statement help the user to connect or to select a data from the database.

 

<cfquery name="student_profile" datasource="ds_studprof" >
                SELECT first_name, last_name FROM student_prof WHERE last_name LIKE ‘#search#%’
        </cfquery>

 

In order to make a CFM statement you should have first to put the opening and the closing tag of this language which is the cfquery. cfquery helps us to create a request on the database. Then the name followed by our datasource in which we were going to get our data. Then the keyword SELECT and the name of the table, THEN is another keyword and then the name of your table in which the data is located. WHERE is a keyword in which it will going to filter all the data going our from the database. I hope that this idea can help you.

Comments »

The URI to TrackBack this entry is: http://jlawrence.blogsome.com/2009/11/17/how-to-select-table-from-database-using-cfm/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.






















Get free blog up and running in minutes with Blogsome
Theme designed by Minz Meyer