please give me a query for already existing name in the data base using mysql
please give me a query for already existing name in the data base
Collapse
X
-
i have 4 fields like below
id name email phone
submit(button)
now i want already exist name should not store in the data base once again.
my table name is sudha
my data base name is sudheer
thank u for u r response
sudheer
Originally posted by mwasifPlease tell us your table structure (table name and the columns you have in the table).Comment
-
Sounds like a good candidate for a trigger. Are you using MySQL 5.0 or higher?Originally posted by sudheerki have 4 fields like below
id name email phone
submit(button)
now i want already exist name should not store in the data base once again.
my table name is sudha
my data base name is sudheer
thank u for u r response
sudheerComment
-
That's old. Are you sure it's 2.6.1?Originally posted by sudheerkexactly iam not getting u r point.
but my sql version is 2.6.1
Anyway if you don't have trigger support for your MySQL version then you may have to do a select from the table where name = newName. If it returns any data then don't add the new name (It's already there).Comment
-
MYSQL 4.1.10a LICENSE
now i got my musql vrsion sir ie 4.1.10
now tell me sir
give me a small example program
Originally posted by sudheerkno sir,
and also trigger concept
so plz give me exact query to do that thing ie already existing name in the data baseComment
-
Stop being such a beggar and try. There's a million resources in Google about basic MySQL queries, and theres an entire manual at http://dev.mysql.com/doc and most installations of MySQL come with the manual. You've already been given the syntax, now get to work.Comment
-
This is the queryOriginally posted by sudheerkno sir,
and also trigger concept
so plz give me exact query to do that thing ie already existing name in the data base
[CODE=mysql]SELECT * FROM sudha WHERE name = 'username';[/CODE]
Replace username with the user name you want to know about.
To accomplish your task you need the following- Post data using HTML form
- Connect to database using PHP
- Retrieve data from database using PHP
Comment
Comment