Hello
I need to validate a numeric field against a DB table only if this field is filled ie > 0
I tried to use
Code:
SELECT * FROM #__affiliate_tracker_accounts WHERE id = [value]
but of course it does not validate if the field is not filled
So how can I validate only when the field is above 0 ?
Can I make a code validation instead of a query validation such as
Code:
return ( ( (int) 'SELECT * FROM #__affiliate_tracker_accounts WHERE id = [value]' ) >= 0 );