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

Create Function

Status
Not open for further replies.

teaser01

Programmer
Jan 24, 2011
1
GB
Hi,

I am seeking assistance in writing a function in mysql to do the following.

Basically the value of the variable by default or if the variable is null then to set it as curdate(). Otherwise set the variable with whatever the user enters.

This function will be called in html so that on the form the user can select what date they want to see. By default we want the form to load with the current date.

Hope this makes sense.

T

 
This is not a mysql related question as MYSQL is a database, cannot affect webpages by itself. This would be a question for whichever server side language you are using to connect to the DB. Be it PHP, ASP or whatever else.


The best mysql can do is have a default value in a date field when none is inserted.

Anything related to the website itself is beyond mysql.





----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top