Guest User

Untitled

a guest
Jul 17th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. %buat koneksi dengan database mysql.
  2. conn = database('tws','root','password','com.mysql.jdbc.Driver','jdbc:mysql://localhost:3306/tws');
  3.  
  4. %preparing the result from fem and converting the data to cell type.
  5. dd=d';
  6. dd=num2cell(dd);
  7. for i=1:25
  8. exdata(:,i)=dd(:,i);
  9. end
  10.  
  11. %what columns would be insert to.
  12. colnames = {'tf1','tf2','tf3','tf4','tf5','tf6','tf7','tf8','tf9','tf10',...
  13. 'tf11','tf12','tf13','tf14','tf15','tf16','tf17','tf18','tf19','tf20',...
  14. 'tf21','tf22','tf23','tf24','tf25'};
  15.  
  16. %insert some pieces of data.
  17. fastinsert(conn, 'fem', colnames, exdata);
Add Comment
Please, Sign In to add comment