check if value exists


Posted on 16th Feb 2014 07:03 pm by admin

I have googled this for a while and I am getting lots of different results. Is there a standard method used for checking to see if a value exists in a database before inserting a value? I have a form, you type your name and push submit, it inserts the name into the database and then the name shows up in a list. Right now, it accepts the same values. I want to add a check to say

Did you know?Explore Trending and Topic pages for more stories like this.
if name exists, do something
No comments posted yet

Your Answer:

Login to answer
337 Like 35 Dislike
Previous forums Next forums
Other forums

Getting number of affected rows in SQLPLUS..
Hi everyone,
I have a shell script where i am invoking sqlplus, running a query and saving t

PHP and MySQL Question/Help
I have a MySQL db with all my servers and all their details like server name, IP, OS, RAM etc etc 26

building a function with multiple outputs
I want to build a function that has multiple outputs.

I know but am not to sure how I should

PHP error on MySQL insert
I'm sure it's the simplest of issues, but I can't recall why this isn't working.

Code: [Selec

question about header() security
is is safe to just use the header() function to redirect someone if they are, say, not logged in? or

. and .. appearing instead of pictures
First of all, thanks very much for providing this forum. It is very much appreciated!

My son

selectbox+database connection retrive problem
Code: [Select]
<tr>
<th align="left" scope="c

How to use Substr
I want to check for the word CATEGORY: inside a string which can be CATEGORY: ITEM
and remove the

mysql query with single quotes in a variable
$sitedetails = "INSERT INTO vars (address, sitename, description, ownername, theme) VALUES ('$u

how do i display data on a page from mysql
1 - do i use this code at the top of each of my page i wish to only alow access if there as been a s

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash