For SELECT statements, fbsql_query() returns a new result identifier that you can pass to fbsql_result().
Assuming the query succeeds, you can call fbsql_num_rows() to find out how many rows were returned for a SELECT statment or fbsql_affected_rows() to find out how many rows were affected by a DELETE, INSERT, REPLACE, or UPDATE statement.