Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cheking if a query has no results

Status
Not open for further replies.

tjmcc18

Programmer
Jul 8, 2003
4
US
Hi,

I have a question that may sound simple, but I haven't been able to get it to work. I am trying to write a simple page that will allow the user to put in their name and a number. I am tying to keep track of totals for each name in a database. Therefore, if someone types in a new name, I must add a new row to my database. If someone types in a name already in the database, I have to update the information. How can I determine whether or not a query such as the following gives any results:

SELECT amount FROM dbase
WHERE (dbname EQUALS inputname)

If the inputted name is not in the database, there will be no results. How can I check for this? Is there an easier way to do the same thing? Thanks in advance,

TJ

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top