Hello,
why return is all time "noloc" but in puts is select from db?Code:String getLoc() { String ret = "noloc"; _sqLite.Query(Core.Database.Sql.Builder.Append("SELECT x,y,z FROM locations ORDER BY RANDOM() LIMIT 1;"), _sqLiteConnection, list => { foreach (var entry in list) { ret = (string)entry["x"] + "-" + (string)entry["y"] + "-" + (string)entry["z"];; Puts(ret); } }); return ret; }
Handling return with SQL query?
Discussion in 'Rust Development' started by zhulenejsnek, Feb 23, 2017.