nested-statement

Quick question about returning from a nested statement

If I have something like a loop or a set of if/else statements, and I want to return a value from within the nest (see below), is the best way of doing this to assign the value to a field or property and return that? See below: bool b; public bool ifelse(int i) { if(i == 5) { b = true; } else { b = false; } return b; } ...

Nested statements in sqlite

I'm using the sqlite3 library in c++ to query the database from *.sqlite file. can you write a query statement in sqlite3 like: char* sql = "select name from table id = (select full_name from second_table where column = 4);" The second statement should return an id to complete the query statement with first statement. ...