User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 403,402 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,647 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 227 | Replies: 4
Reply
Join Date: Mar 2008
Posts: 2
Reputation: zatie is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
zatie zatie is offline Offline
Newbie Poster

how to block data redundency using php

  #1  
Apr 16th, 2008
i want to know simple coding how to check duplicate record.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 553
Reputation: kkeith29 is on a distinguished road 
Rep Power: 3
Solved Threads: 55
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Posting Pro

Re: how to block data redundency using php

  #2  
Apr 16th, 2008
in a database or what?
Reply With Quote  
Join Date: Mar 2008
Posts: 2
Reputation: zatie is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
zatie zatie is offline Offline
Newbie Poster

Re: how to block data redundency using php

  #3  
Apr 16th, 2008
yes..in database
Reply With Quote  
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 553
Reputation: kkeith29 is on a distinguished road 
Rep Power: 3
Solved Threads: 55
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Posting Pro

Re: how to block data redundency using php

  #4  
Apr 16th, 2008
use 'unique' on the column in the database. it won't allow the same data twice in that column.
Reply With Quote  
Join Date: Nov 2007
Location: Arkansas
Posts: 369
Reputation: buddylee17 will become famous soon enough buddylee17 will become famous soon enough 
Rep Power: 2
Solved Threads: 70
buddylee17's Avatar
buddylee17 buddylee17 is online now Online
Posting Whiz

Re: how to block data redundency using php

  #5  
Apr 16th, 2008
Use SELECT DISTINCT in the query. This will discard duplicate rows. It is better to set constraints like mentioned above to eliminate duplicates from being inserted though.
Last edited by buddylee17 : Apr 16th, 2008 at 9:14 pm.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the PHP Forum

All times are GMT -4. The time now is 9:51 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC