',iID,'
ExecuteSQLit sql=
select concat('',Forms.fID,'') as Form,fDescription as Description, fHelp as Help, fPreLogic as PreLogic, fPostLogic as PostLogic from InstrumentForms,Forms where iID='',iID,'' and InstrumentForms.fID=Forms.fID and ifIsDeleted=0 order by fOrder

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'iID,'' and InstrumentForms.fID=Forms.fID and ifIsDeleted=0 order by fOrder' at line 1