RSS Forums RSS
Please support our PHP advertiser: Lunarpages PHP Web Hosting

Checking for multiple database entries

Join Date: Feb 2002
Location: Long Island, NY
Posts: 1,134
Reputation: samaru is just really nice samaru is just really nice samaru is just really nice samaru is just really nice 
Rep Power: 12
Solved Threads: 4
Colleague
samaru's Avatar
samaru samaru is offline Offline
a.k.a inscissor

Re: Checking for multiple database entries

  #2  
Jun 10th, 2004
All you have to do is run a select statement looking for the value you just inserted. This goes right after your insert statement.

Here's some pseudo code:
 
1. insert into table(field1) values('value')
2. y = select count(field1) from table where field1 = 'value'
3. if (y == 1)
	  just one exists
   elseif( y > 1)
	  multiple exist
 

If you need more help let us know.
_.:: my websites ::._
blog @ www.samaru.net * engi No Jutsu @ www.narutorp.net * portfolio @ shinylight.com
deviantART: inscissor
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 4:42 pm.
Newsletter Archive - Sitemap - Privacy Statement - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC