Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
|
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 26th, 2006, 06:40 AM
Authorized User
 
Join Date: Nov 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to determine if there is existing data

please help me to know if there is a data in my database table, if there is an existing data therefore i cannot save / insert my current data but if the table is empty or has no duplicate with my current data then i will save to it

 
Old November 28th, 2006, 08:06 PM
Registered User
 
Join Date: Nov 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to fedoracore
Default

in order to best understand your database, begin by thoroughly studying these few items:
MySQL (assuming this is your Database):
http://dev.mysql.com/doc/refman/5.0/...le-status.html

PHP Info about MySQL
http://www.php.net/manual/en/faq.databases.php
http://www.php.net/manual/en/functio...-field-len.php
(from the above, view the list at the left)

EDIT: -- several international localized languages are provided for each manual:
http://dev.mysql.com/doc/
http://www.php.net/docs.php
http://www.php.net/manual/en/about.prototypes.php


I hope that helps!
;)

***********************
Do the hokey pokey.
Turn yourself around.
 
Old December 3rd, 2006, 01:35 AM
Registered User
 
Join Date: Dec 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The single easiest way to prevent duplicate data is to create a unique index on the column that you don't wish to duplicate data in. Whenever an insert occurs which includes data in the column with a unique key assigned, and the data is determined to be duplicate, the insert will fail.






Similar Threads
Thread Thread Starter Forum Replies Last Post
VB.net, adding XML data to an existing XML file saikoboarder XML 11 April 17th, 2008 04:19 PM
Determine if numeric Scootterp Access VBA 4 March 2nd, 2006 08:44 AM
Adding existing and non-existing attributes spencer.clark XSLT 5 July 27th, 2005 04:02 PM
Determine Last Cells Containing Data crmpicco Excel VBA 0 May 16th, 2005 06:52 AM
Determine the number of data rows in a sheet ashu_gupta75 Excel VBA 1 July 31st, 2004 03:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.