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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with building a stored Proc that updates using an if test

Status
Not open for further replies.

FireFett

Programmer
Mar 31, 2000
42
US
Hello everyone.

I need some help building a sp with an if statement (really need to get a book but hoping someone can help me out right now)

I have a table with the following fields:
User varchar(25)
UserName varchar(50)
PUID varchar(25)
TS TimeStamp


Now what I want to do is make an SP that checks the Timestamp with a timestamp of a in paramater and if they are the same update the record with changes so I will have parameters for the other fields too and if the timestamp in the table is more recent than the parameter have a flag var returned by the sp. Problem is I have no idea how to do this in mysql can someone help me out.
 
The complete MySQL documentation is available here:

You will find that faq222-2244 gives guidance on forum usage, and on doing your primary research

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top