Info
此问题已关闭。 请重新打开它进行编辑或回答。
Unable to retrieve string from MySQL
1 次查看(过去 30 天)
显示 更早的评论
I am connecting to mysql database and retrieveing a row. The returned data only contains database fields that cointain integer but not strings.
cmd = 'SELECT * FROM table.stim WHERE sid =%d';
A1=3;
cmd = sprintf(cmd,A1);
query = sprintf(cmd);
conn = database('','admin','');
data = select(conn, cmd);
close(conn)
clear conn query
The returned data:
120 10 ''
actual database row:
120 10 s6-2-red-mr-xs.png
so I can retrieve the fieds with integer values, but the mysql field with "s6-2-red-mr-xs.png" is retutned as ''
Any help appreciated. Thank you
1 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!