Untitled
unknown
plain_text
a year ago
349 B
15
Indexable
fn select_first<'a>() -> &'a str {
let connection = sqlite::open("contacts").unwrap();
let mut record= "";
let query = "SELECT * FROM contacts WHERE id = 1;";
connection
.iterate(query, |pairs| {
for &(name,value) in pairs.iter() {
record = value.unwrap();
}
true
}).unwrap();
record
}Editor is loading...
Leave a Comment