This topic is locked

date of birth

11/21/2013 11:06:16 PM
PHPRunner General questions
S
stanbar1 author

hi

try to use:Calculate Age from BirthDate
Function BeforeAdd($dict)

{

str = "SELECT DateDiff('yyyy','" & dict("BirthDate") & "', Now()) AS Age FROM fsinfo"

Set rsTemp = server. CreateObject ( "ADODB.Recordset" )

rsTemp. open str , dbConnection

dict("Age") = rsTemp("Age")

BeforeAdd = True
End Function
}
Parse error: syntax error, unexpected '=' in /home/content/98/11753698/html/billing/include/fsinfo_events.php on line 106
and also before record updated:

Function BeforeEdit(dict, where)

str = "SELECT DateDiff('yyyy','" & dict("BirthDate") & "', Now()) AS Age FROM fsinfo"

Set rsTemp = server. CreateObject ( "ADODB.Recordset" )

rsTemp. open str , dbConnection

dict("Age") = rsTemp("Age")

BeforeEdit = True
End Function
Thank You