My table has this structure T_user(usern,pass,realname: varchar(50);
I am a beginner in Firebird and I want to execute the following statements, but I get this error:
if (select Count(*) as cnt FROM T_USER WHERE ( usern = 'test') And (pass
= ']')) > 0 then select T_user.realname from t_user where t_user.usern = 'test';
This is the error message:
Error: IBPP::SQLException Context: Statement::Prepare( if
(select Count(*) as cnt FROM T_USER WHERE ( usern = ‘test’) And (pass
= ‘]’)) > 0 then select T_user.realname from t_user where t_user.usern = ‘test’ ) Message: isc_dsql_prepare failedSQL Message : -104 Invalid token
Engine Code : 335544569 Engine Message : Dynamic SQL Error SQL
error code = -104 Token unknown – line 1, column 1 if
I’m using Firebird 2.5 and FlameRobin.
Try this code: