HI ..
Id and password are int data type in database
I want to check if the id and password entered by user are in database.
Code:
a = get(handles.Id,'String');b = get(handles.password,'String');conn = database.ODBCConnection('users','root','root');x = exec(conn,'select ID from Admin');y = exec(conn,'select Password from Admin');x = fetch(x);y = fetch(y);x1 = x.Datay1 = y.DataL1 = strcmp(a,x1)L2= strcmp(b,x1)if L1 == 1 && L2 == 1track elsemsgbox('Rong ID or Password ! ');end
I trired to convert x1 and y1 to string
x2 = num2str(x1);
I get this error:
Input to num2str must be numeric.
I know that x1 is cell but I don't know how can I do it !
Can you please help me?
Best Answer