0

hi,
I had a project page where we can see projectname and allocate memory text boxes. so my query is that wen we enter a project name and if already a project exists with the same name then i should get a popup. i mean it should not allow duplicate entries.
Thank u.

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by rajarajan07
0

Logic:

I assumed that you have a variable name $pname which contains the project name you currently entered.

Now connect to database and with the table do the following:

Select projectname from projects where projectname=$pname;

If your query returns 0 (means no result from databse). This will confirm you there is no record in the database with the name you entered. Thats it!

Now update the database with yur new project. Simple!

I hope you understand the logic!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.