EasyCFM.COM ColdFusion Forums / Coding Help! / checking for existing record before INSERT command

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: checking for existing record before INSERT command

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

egiblock
11-11-2003 @ 6:50 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 214
Joined: Mar 2003

i am adding things to a database, and was wondering, how do i query the database first to see if the record exists already before i insert the record.  

i don't want any duplicates in the database..

any tutorials for this? or is it simple?  i'm running out the door right now and didn't / don't have time to check out the site right now..


thanks


Eric Giblock
Owner ~ Sr. Progammer
Web Alterations ~ www.webalterations.com

GTIMANiac
11-11-2003 @ 7:21 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 291
Joined: Feb 2003

You could query the database then have an IF condition based on RecordCount.

MikeBam
11-11-2003 @ 9:14 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 237
Joined: Jul 2003

http://tutorial45.easycfm.com/

Yeah, you have to use record count. That tutorial should explain it.

Mike


Website Designed and Developed by Pablo Varando.