Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Using format specifiers for extracting data from sqlite database file
1 回表示 (過去 30 日間)
古いコメントを表示
In the given code snippet, what should be done at the "?" to get the details mentioned in the query from a table BIO in the database file database.db?
I need to place name (John) at the question mark. What should be done to get the result?
(No element in the database table is NULL)
con = sqlite('database.db');
name = "John";
sqlquery = "SELECT AGE,EMAIL,EDUCATION FROM BIO WHERE NAME == ?";
result = fetch(con,sqlquery);
0 件のコメント
回答 (1 件)
Jalaj Gambhir
2020 年 8 月 25 日
編集済み: Jalaj Gambhir
2020 年 8 月 25 日
Hi,
Have a look at the answer here. You have to create a string using square brackets to concatenate the variable with the remaining query.
Hope this helps!
0 件のコメント
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!