Sql query not working on matlab properly -
so i'm working on laravel project pass data matlab , matlab edit them..everything works fine except function of matlab wrote..
function show(a) econ=database('datamining','root',''); curs=exec(con,'select name dataset_choices id = a'); curs = fetch(curs); curs.data end i want function display name of dataset user choose..the problem doesnt work writing id = a... if write example id=1 works.. tried display a disp(a) see value of a , store right id user had choose..so how can use in query??
try:
a = num2str(a); % or make sure user inputs string instead curs=exec(con,['select name dataset_choices id = ',a]); if = '1', brackets print: 'select name dataset_choices id = 1'
Comments
Post a Comment