Info
This question is closed. Reopen it to edit or answer.
surpress output of MySQL connection function
1 view (last 30 days)
Show older comments
Hello,
I'm wondering if I can surpress the output of my function:
function [reference, suspect] = sqldata( host,db,user,password,reference_tbl,suspect_tbl)
%%Create DB Connection
clear conn
conn = database(db, user, password, ...
'com.mysql.jdbc.Driver', ...
['jdbc:mysql://' host ':3306/' db]);
%%Fetch Data
setdbprefs('DataReturnFormat','cellarray');
e = exec(conn,['SELECT * FROM ' reference_tbl]);
e = fetch(e);
reference = e.Data;
e = exec(conn,['SELECT * FROM ' suspect_tbl]);
e = fetch(e);
suspect = e.Data;
end
using the ';' when using the function doesn't work however …
Help is greatly appreciated.
2 Comments
Answers (0)
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!