source: MML/trunk/applications/database/mym/utilities/Sample session.html @ 4

Last change on this file since 4 was 4, checked in by zhangj, 11 years ago

Initial import--MML version from SOLEIL@2013

File size: 49.0 KB
Line 
1<html xmlns:v="urn:schemas-microsoft-com:vml"
2xmlns:o="urn:schemas-microsoft-com:office:office"
3xmlns:w="urn:schemas-microsoft-com:office:word"
4xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd"
5xmlns="http://www.w3.org/TR/REC-html40">
6
7<head>
8<meta http-equiv=Content-Type content="text/html; charset=utf-8">
9<meta name=ProgId content=Word.Document>
10<meta name=Generator content="Microsoft Word 10">
11<meta name=Originator content="Microsoft Word 10">
12<link rel=File-List href="Sample%20session_files/filelist.xml">
13<title>sample_session</title>
14<!--[if gte mso 9]><xml>
15 <o:DocumentProperties>
16  <o:Author>Dimitri Shvorob</o:Author>
17  <o:Template>Normal</o:Template>
18  <o:LastAuthor>damu</o:LastAuthor>
19  <o:Revision>8</o:Revision>
20  <o:TotalTime>24</o:TotalTime>
21  <o:Created>2006-07-10T14:57:00Z</o:Created>
22  <o:LastSaved>2006-08-07T17:31:00Z</o:LastSaved>
23  <o:Pages>1</o:Pages>
24  <o:Words>645</o:Words>
25  <o:Characters>3677</o:Characters>
26  <o:Company>Vanderbilt University</o:Company>
27  <o:Lines>30</o:Lines>
28  <o:Paragraphs>8</o:Paragraphs>
29  <o:CharactersWithSpaces>4314</o:CharactersWithSpaces>
30  <o:Version>10.4219</o:Version>
31 </o:DocumentProperties>
32</xml><![endif]--><!--[if gte mso 9]><xml>
33 <w:WordDocument>
34  <w:SpellingState>Clean</w:SpellingState>
35  <w:GrammarState>Clean</w:GrammarState>
36  <w:Compatibility>
37   <w:UseFELayout/>
38  </w:Compatibility>
39  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
40 </w:WordDocument>
41</xml><![endif]-->
42<style>
43<!--p
44        {max-width: 600px;
45        width:expression(document.body.clientWidth > 620 ? "600px": "auto" );}
46h1
47        {max-width: 600px;
48        width:expression(document.body.clientWidth > 620 ? "600px": "auto" );}
49h2
50        {max-width: 600px;
51        width:expression(document.body.clientWidth > 620 ? "600px": "auto" );}
52div
53        {max-width: 600px;
54        width:expression(document.body.clientWidth > 620 ? "600px": "auto" );}
55
56 /* Font Definitions */
57 @font-face
58        {font-family:Wingdings;
59        panose-1:5 0 0 0 0 0 0 0 0 0;
60        mso-font-charset:2;
61        mso-generic-font-family:auto;
62        mso-font-pitch:variable;
63        mso-font-signature:0 268435456 0 0 -2147483648 0;}
64@font-face
65        {font-family:宋䜓;
66        panose-1:2 1 6 0 3 1 1 1 1 1;
67        mso-font-alt:SimSun;
68        mso-font-charset:134;
69        mso-generic-font-family:auto;
70        mso-font-pitch:variable;
71        mso-font-signature:3 135135232 16 0 262145 0;}
72@font-face
73        {font-family:"\@宋䜓";
74        panose-1:2 1 6 0 3 1 1 1 1 1;
75        mso-font-charset:134;
76        mso-generic-font-family:auto;
77        mso-font-pitch:variable;
78        mso-font-signature:3 135135232 16 0 262145 0;}
79 /* Style Definitions */
80 p.MsoNormal, li.MsoNormal, div.MsoNormal
81        {mso-style-parent:"";
82        margin:0in;
83        margin-bottom:.0001pt;
84        mso-pagination:widow-orphan;
85        font-size:12.0pt;
86        font-family:"Times New Roman";
87        mso-fareast-font-family:"Times New Roman";
88        mso-believe-normal-left:yes;}
89h1
90        {mso-margin-top-alt:auto;
91        margin-right:0in;
92        mso-margin-bottom-alt:auto;
93        margin-left:0in;
94        mso-pagination:widow-orphan;
95        mso-outline-level:1;
96        font-size:24.0pt;
97        font-family:"Times New Roman";
98        mso-fareast-font-family:宋䜓;
99        color:#990000;
100        font-weight:bold;}
101h2
102        {mso-style-update:auto;
103        mso-margin-top-alt:auto;
104        margin-right:0in;
105        mso-margin-bottom-alt:auto;
106        margin-left:0in;
107        mso-pagination:widow-orphan;
108        mso-outline-level:2;
109        font-size:12.0pt;
110        font-family:"Times New Roman";
111        mso-fareast-font-family:宋䜓;
112        color:#333399;
113        font-weight:bold;}
114a:link, span.MsoHyperlink
115        {mso-ansi-font-size:12.0pt;
116        font-family:"Times New Roman";
117        mso-ascii-font-family:"Times New Roman";
118        mso-hansi-font-family:"Times New Roman";
119        mso-bidi-font-family:"Times New Roman";
120        color:gray;
121        mso-text-animation:none;
122        text-decoration:none;
123        text-underline:none;
124        text-decoration:none;
125        text-line-through:none;}
126a:visited, span.MsoHyperlinkFollowed
127        {color:blue;
128        text-decoration:underline;
129        text-underline:single;}
130p
131        {mso-margin-top-alt:auto;
132        margin-right:0in;
133        mso-margin-bottom-alt:auto;
134        margin-left:0in;
135        mso-pagination:widow-orphan;
136        font-size:12.0pt;
137        font-family:"Times New Roman";
138        mso-fareast-font-family:"Times New Roman";}
139pre
140        {margin:0in;
141        margin-bottom:.0001pt;
142        line-height:150%;
143        mso-pagination:widow-orphan;
144        tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
145        font-size:10.0pt;
146        font-family:"Courier New";
147        mso-fareast-font-family:"Times New Roman";}
148p.footer, li.footer, div.footer
149        {mso-style-name:footer;
150        mso-margin-top-alt:auto;
151        margin-right:0in;
152        mso-margin-bottom-alt:auto;
153        margin-left:0in;
154        text-align:right;
155        mso-pagination:widow-orphan;
156        font-size:7.5pt;
157        font-family:"Times New Roman";
158        mso-fareast-font-family:"Times New Roman";
159        color:gray;
160        font-style:italic;}
161span.keyword
162        {mso-style-name:keyword;
163        color:blue;}
164span.comment
165        {mso-style-name:comment;
166        color:forestgreen;}
167span.string
168        {mso-style-name:string;
169        color:#A020F0;}
170span.untermstring
171        {mso-style-name:untermstring;
172        color:#B20000;}
173span.syscmd
174        {mso-style-name:syscmd;
175        color:#B28C00;}
176span.SpellE
177        {mso-style-name:"";
178        mso-spl-e:yes;}
179span.GramE
180        {mso-style-name:"";
181        mso-gram-e:yes;}
182@page Section1
183        {size:8.5in 11.0in;
184        margin:1.0in 1.25in 1.0in 1.25in;
185        mso-header-margin:.5in;
186        mso-footer-margin:.5in;
187        mso-paper-source:0;}
188div.Section1
189        {page:Section1;}
190 /* List Definitions */
191 @list l0
192        {mso-list-id:1189830856;
193        mso-list-template-ids:1642085160;}
194@list l0:level1
195        {mso-level-number-format:bullet;
196        mso-level-text:;
197        mso-level-tab-stop:27.0pt;
198        mso-level-number-position:left;
199        margin-left:27.0pt;
200        text-indent:-.25in;
201        mso-ansi-font-size:10.0pt;
202        font-family:Symbol;}
203@list l0:level2
204        {mso-level-tab-stop:63.0pt;
205        mso-level-number-position:left;
206        margin-left:63.0pt;
207        text-indent:-.25in;}
208@list l0:level3
209        {mso-level-tab-stop:99.0pt;
210        mso-level-number-position:left;
211        margin-left:99.0pt;
212        text-indent:-.25in;}
213@list l0:level4
214        {mso-level-tab-stop:135.0pt;
215        mso-level-number-position:left;
216        margin-left:135.0pt;
217        text-indent:-.25in;}
218@list l0:level5
219        {mso-level-tab-stop:171.0pt;
220        mso-level-number-position:left;
221        margin-left:171.0pt;
222        text-indent:-.25in;}
223@list l0:level6
224        {mso-level-tab-stop:207.0pt;
225        mso-level-number-position:left;
226        margin-left:207.0pt;
227        text-indent:-.25in;}
228@list l0:level7
229        {mso-level-tab-stop:243.0pt;
230        mso-level-number-position:left;
231        margin-left:243.0pt;
232        text-indent:-.25in;}
233@list l0:level8
234        {mso-level-tab-stop:279.0pt;
235        mso-level-number-position:left;
236        margin-left:279.0pt;
237        text-indent:-.25in;}
238@list l0:level9
239        {mso-level-tab-stop:315.0pt;
240        mso-level-number-position:left;
241        margin-left:315.0pt;
242        text-indent:-.25in;}
243@list l1
244        {mso-list-id:1380324241;
245        mso-list-template-ids:-1394472230;}
246@list l1:level1
247        {mso-level-number-format:bullet;
248        mso-level-text:;
249        mso-level-tab-stop:27.0pt;
250        mso-level-number-position:left;
251        margin-left:27.0pt;
252        text-indent:-.25in;
253        mso-ansi-font-size:10.0pt;
254        font-family:Wingdings;}
255@list l1:level2
256        {mso-level-tab-stop:63.0pt;
257        mso-level-number-position:left;
258        margin-left:63.0pt;
259        text-indent:-.25in;}
260@list l1:level3
261        {mso-level-tab-stop:99.0pt;
262        mso-level-number-position:left;
263        margin-left:99.0pt;
264        text-indent:-.25in;}
265@list l1:level4
266        {mso-level-tab-stop:135.0pt;
267        mso-level-number-position:left;
268        margin-left:135.0pt;
269        text-indent:-.25in;}
270@list l1:level5
271        {mso-level-tab-stop:171.0pt;
272        mso-level-number-position:left;
273        margin-left:171.0pt;
274        text-indent:-.25in;}
275@list l1:level6
276        {mso-level-tab-stop:207.0pt;
277        mso-level-number-position:left;
278        margin-left:207.0pt;
279        text-indent:-.25in;}
280@list l1:level7
281        {mso-level-tab-stop:243.0pt;
282        mso-level-number-position:left;
283        margin-left:243.0pt;
284        text-indent:-.25in;}
285@list l1:level8
286        {mso-level-tab-stop:279.0pt;
287        mso-level-number-position:left;
288        margin-left:279.0pt;
289        text-indent:-.25in;}
290@list l1:level9
291        {mso-level-tab-stop:315.0pt;
292        mso-level-number-position:left;
293        margin-left:315.0pt;
294        text-indent:-.25in;}
295@list l2
296        {mso-list-id:1978561421;
297        mso-list-template-ids:-1394472230;}
298@list l2:level1
299        {mso-level-number-format:bullet;
300        mso-level-text:;
301        mso-level-tab-stop:27.0pt;
302        mso-level-number-position:left;
303        margin-left:27.0pt;
304        text-indent:-.25in;
305        mso-ansi-font-size:10.0pt;
306        font-family:Wingdings;}
307@list l2:level2
308        {mso-level-tab-stop:63.0pt;
309        mso-level-number-position:left;
310        margin-left:63.0pt;
311        text-indent:-.25in;}
312@list l2:level3
313        {mso-level-tab-stop:99.0pt;
314        mso-level-number-position:left;
315        margin-left:99.0pt;
316        text-indent:-.25in;}
317@list l2:level4
318        {mso-level-tab-stop:135.0pt;
319        mso-level-number-position:left;
320        margin-left:135.0pt;
321        text-indent:-.25in;}
322@list l2:level5
323        {mso-level-tab-stop:171.0pt;
324        mso-level-number-position:left;
325        margin-left:171.0pt;
326        text-indent:-.25in;}
327@list l2:level6
328        {mso-level-tab-stop:207.0pt;
329        mso-level-number-position:left;
330        margin-left:207.0pt;
331        text-indent:-.25in;}
332@list l2:level7
333        {mso-level-tab-stop:243.0pt;
334        mso-level-number-position:left;
335        margin-left:243.0pt;
336        text-indent:-.25in;}
337@list l2:level8
338        {mso-level-tab-stop:279.0pt;
339        mso-level-number-position:left;
340        margin-left:279.0pt;
341        text-indent:-.25in;}
342@list l2:level9
343        {mso-level-tab-stop:315.0pt;
344        mso-level-number-position:left;
345        margin-left:315.0pt;
346        text-indent:-.25in;}
347ol
348        {margin-bottom:0in;}
349ul
350        {margin-bottom:0in;}
351-->
352</style>
353<!--[if gte mso 10]>
354<style>
355 /* Style Definitions */
356 table.MsoNormalTable
357        {mso-style-name:"Table Normal";
358        mso-tstyle-rowband-size:0;
359        mso-tstyle-colband-size:0;
360        mso-style-noshow:yes;
361        mso-style-parent:"";
362        mso-padding-alt:0in 5.4pt 0in 5.4pt;
363        mso-para-margin:0in;
364        mso-para-margin-bottom:.0001pt;
365        mso-pagination:widow-orphan;
366        font-size:10.0pt;
367        font-family:"Times New Roman";}
368</style>
369<![endif]--><![if mso 9]>
370<style>
371p.MsoNormal
372        {margin-left:7.5pt;}
373</style>
374<![endif]><!--
375This HTML is auto-generated from an M-file.
376To make changes, update the M-file and republish this document.
377      -->
378<meta name=date content=2006-07-07>
379<meta name=m-file content="sample_session">
380<!--[if gte mso 9]><xml>
381 <o:shapedefaults v:ext="edit" spidmax="7170"/>
382</xml><![endif]--><!--[if gte mso 9]><xml>
383 <o:shapelayout v:ext="edit">
384  <o:idmap v:ext="edit" data="1"/>
385 </o:shapelayout></xml><![endif]-->
386</head>
387
388<body bgcolor=white lang=EN-US link=gray vlink=blue style='tab-interval:.5in;
389margin-left:7.5pt;margin-top:7.5pt;margin-right:7.5pt;margin-bottom:7.5pt'>
390
391<div class=Section1>
392
393<h2>Sample session<o:p></o:p></h2>
394
395<div>
396
397<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
398margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span
399style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
400mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span
401style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
402</span></span></span><![endif]><span style='color:#333300'><a href="#1"><span
403style='color:#333300'>List functions available for interacting with MySQL</span></a><o:p></o:p></span></p>
404
405<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
406margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span
407style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
408mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span
409style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
410</span></span></span><![endif]><span style='color:#333300'><a href="#3"><span
411style='color:#333300'>Check connection status</span></a><o:p></o:p></span></p>
412
413<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
414margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span
415style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
416mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span
417style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
418</span></span></span><![endif]><span style='color:#333300'><a href="#4"><span
419style='color:#333300'>Start an instance of MySQL</span></a><o:p></o:p></span></p>
420
421<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
422margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span
423style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
424mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span
425style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
426</span></span></span><![endif]><span style='color:#333300'><a href="#6"><span
427style='color:#333300'>List available databases</span></a><o:p></o:p></span></p>
428
429<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
430margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span
431style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
432mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span
433style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
434</span></span></span><![endif]><span style='color:#333300'><a href="#7"><span
435style='color:#333300'>Delete an un-needed database</span></a><o:p></o:p></span></p>
436
437<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
438margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span
439style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
440mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span
441style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
442</span></span></span><![endif]><span style='color:#333300'><a href="#8"><span
443style='color:#333300'>Confirm that deletion succeeded</span></a><o:p></o:p></span></p>
444
445<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
446margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span
447style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
448mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span
449style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
450</span></span></span><![endif]><span style='color:#333300'><a href="#9"><span
451style='color:#333300'>Add a new database</span></a><o:p></o:p></span></p>
452
453<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
454margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span
455style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
456mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span
457style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
458</span></span></span><![endif]><span style='color:#333300'><a href="#10"><span
459style='color:#333300'>Open the new database</span></a><o:p></o:p></span></p>
460
461<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
462margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span
463style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
464mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span
465style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
466</span></span></span><![endif]><span style='color:#333300'><a href="#11"><span
467style='color:#333300'>Verify that the new database is current</span></a><o:p></o:p></span></p>
468
469<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
470margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span
471style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
472mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span
473style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
474</span></span></span><![endif]><span style='color:#333300'><a href="#12"><span
475style='color:#333300'>List tables present in current database</span></a><o:p></o:p></span></p>
476
477<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
478margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span
479style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
480mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span
481style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
482</span></span></span><![endif]><span style='color:#333300'><a href="#13"><span
483style='color:#333300'>Add a new table</span></a><o:p></o:p></span></p>
484
485<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
486margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span
487style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
488mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span
489style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
490</span></span></span><![endif]><span style='color:#333300'><a href="#16"><span
491style='color:#333300'>Verify that the table was created</span></a><o:p></o:p></span></p>
492
493<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
494margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span
495style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
496mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span
497style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
498</span></span></span><![endif]><span style='color:#333300'><a href="#17"><span
499style='color:#333300'>Correct the typo in table's name</span></a><o:p></o:p></span></p>
500
501<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
502margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span
503style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
504mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span
505style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
506</span></span></span><![endif]><span style='color:#333300'><a href="#18"><span
507style='color:#333300'>Display attributes and size of the table</span></a><o:p></o:p></span></p>
508
509<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
510margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span
511style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
512mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span
513style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
514</span></span></span><![endif]><span style='color:#333300'><a href="#21"><span
515style='color:#333300'>Populate the table with TBWRITE</span></a><o:p></o:p></span></p>
516
517<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
518margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span
519style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
520mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span
521style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
522</span></span></span><![endif]><span style='color:#333300'><a href="#23"><span
523style='color:#333300'>Display contents of the table</span></a><o:p></o:p></span></p>
524
525<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
526margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span
527style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
528mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span
529style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
530</span></span></span><![endif]><span style='color:#333300'><a href="#24"><span
531style='color:#333300'>Read from the table using TBREAD</span></a><o:p></o:p></span></p>
532
533<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
534margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span
535style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
536mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span
537style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
538</span></span></span><![endif]><span style='color:#333300'><a href="#25"><span
539style='color:#333300'>Display new variables</span></a><o:p></o:p></span></p>
540
541<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
542margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span
543style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
544mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span
545style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
546</span></span></span><![endif]><span style='color:#333300'><a href="#26"><span
547style='color:#333300'>Close MySQL</span></a><o:p></o:p></span></p>
548
549</div>
550
551<h2>List functions available for interacting with MySQL<a name=1></a><o:p></o:p></h2>
552
553<pre style='margin-left:22.5pt;line-height:normal'><span class=SpellE><span
554class=GramE>lookfor</span></span> <span class=SpellE><span class=string>mysql</span></span><span
555class=string><o:p></o:p></span></pre><pre style='margin-left:22.5pt;line-height:
556normal'><span style='color:gray'><o:p>&nbsp;</o:p></span></pre><pre
557style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt;
558margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style:
559italic'> MYM - Interact with a MySQL database server <o:p></o:p></span></pre><pre
560style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt;
561margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style:
562italic'><span style='mso-spacerun:yes'> </span>DBADD<span style='mso-spacerun:yes'>     </span>Create a MySQL database <o:p></o:p></span></pre><pre
563style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt;
564margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style:
565italic'><span style='mso-spacerun:yes'> </span>DBCURR<span style='mso-spacerun:yes'>    </span>Show current MySQL database<o:p></o:p></span></pre><pre
566style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt;
567margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style:
568italic'> DBDROP<span style='mso-spacerun:yes'>    </span>Delete a MySQL database <o:p></o:p></span></pre><pre
569style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt;
570margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style:
571italic'><span style='mso-spacerun:yes'> </span>DBLIST<span style='mso-spacerun:yes'>    </span>List available MySQL databases <o:p></o:p></span></pre><pre
572style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt;
573margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style:
574italic'><span style='mso-spacerun:yes'> </span>DBOPEN<span style='mso-spacerun:yes'>    </span>Open a MySQL database <o:p></o:p></span></pre><pre
575style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt;
576margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style:
577italic'><span style='mso-spacerun:yes'> </span><span class=GramE>DBRENAME<span style='mso-spacerun:yes'>  </span>Rename</span> a MySQL database<o:p></o:p></span></pre><pre
578style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt;
579margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style:
580italic'> MYCHECK<span style='mso-spacerun:yes'>   </span>Show status of MySQL connection <o:p></o:p></span></pre><pre
581style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt;
582margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style:
583italic'><span style='mso-spacerun:yes'> </span>MYCLOSE<span style='mso-spacerun:yes'>   </span>Disconnect from MySQL<o:p></o:p></span></pre><pre
584style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt;
585margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style:
586italic'> MYOPEN<span style='mso-spacerun:yes'>    </span>Connect to MySQL <o:p></o:p></span></pre><pre
587style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt;
588margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style:
589italic'><span style='mso-spacerun:yes'> </span>TBADD<span style='mso-spacerun:yes'>     </span>Create a MySQL table <o:p></o:p></span></pre><pre
590style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt;
591margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style:
592italic'><span style='mso-spacerun:yes'> </span>TBATTR<span style='mso-spacerun:yes'>    </span>Show structure of a MySQL table<o:p></o:p></span></pre><pre
593style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt;
594margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style:
595italic'> TBDROP<span style='mso-spacerun:yes'>    </span>Delete a MySQL table<o:p></o:p></span></pre><pre
596style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt;
597margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style:
598italic'> TBLIST<span style='mso-spacerun:yes'>    </span>List tables in a MySQL database <o:p></o:p></span></pre><pre
599style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt;
600margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style:
601italic'><span style='mso-spacerun:yes'> </span>TBPRINT<span style='mso-spacerun:yes'>   </span>Show several rows of a MySQL table<o:p></o:p></span></pre><pre
602style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt;
603margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style:
604italic'> TBREAD<span style='mso-spacerun:yes'>    </span>Read from a MySQL table <o:p></o:p></span></pre><pre
605style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt;
606margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style:
607italic'><span style='mso-spacerun:yes'> </span><span class=GramE>TBRENAME<span style='mso-spacerun:yes'>  </span>Rename</span> a MySQL table<o:p></o:p></span></pre><pre
608style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt;
609margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style:
610italic'> TBSIZE<span style='mso-spacerun:yes'>    </span>Show size of a MySQL table <o:p></o:p></span></pre><pre
611style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt;
612margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style:
613italic'><span style='mso-spacerun:yes'> </span>TBWRITE<span style='mso-spacerun:yes'>   </span>Write to a MySQL table<o:p></o:p></span></pre>
614
615<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>Presence
616of MYM.M is required.</p>
617
618<h2>Check connection status<a name=3></a></h2>
619
620<pre style='margin-left:22.5pt;line-height:normal'><span class=SpellE><span
621class=GramE>mycheck</span></span></pre><pre style='line-height:normal'><span
622class=SpellE><span class=GramE><span style='color:gray;mso-bidi-font-style:
623italic'>ans</span></span></span><span style='color:gray;mso-bidi-font-style:
624italic'> =<o:p></o:p></span></pre><pre style='line-height:normal'><span
625style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>     </span>0<o:p></o:p></span></pre>
626
627<h2>Start an instance of MySQL<a name=4></a><span style='color:#990000'><o:p></o:p></span></h2>
628
629<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>(The
630instance is hidden; no new windows appear).</p>
631
632<pre style='margin-left:22.5pt;line-height:normal'><span class=SpellE><span
633class=GramE>myopen</span></span><span class=GramE>(</span><span class=string>'<span
634class=SpellE>localhost'<span style='color:windowtext'>,</span>'root'<span
635style='color:windowtext'>,</span>'mypwd</span>'</span>)</pre>
636
637<h2>List available databases<a name=6></a></h2>
638
639<pre style='margin-left:22.5pt;line-height:normal'><span class=SpellE><span
640class=GramE>dblist</span></span></pre><pre style='line-height:normal'><span
641class=SpellE><span class=GramE><span style='color:gray;mso-bidi-font-style:
642italic'>ans</span></span></span><span style='color:gray;mso-bidi-font-style:
643italic'> = <o:p></o:p></span></pre><pre style='line-height:normal'><span
644style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>    </span>'<span
645class=SpellE>information_schema</span>'<o:p></o:p></span></pre><pre
646style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>    </span>'<span
647class=SpellE>junk_dbase</span>'<o:p></o:p></span></pre><pre style='line-height:
648normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>    </span>'<span
649class=SpellE><span class=GramE>mysql</span></span>'<o:p></o:p></span></pre>
650
651<h2>Delete an un-needed database<a name=7></a><span style='color:#990000'><o:p></o:p></span></h2>
652
653<pre style='margin-left:22.5pt;line-height:normal'><span class=SpellE><span
654class=GramE>dbdrop</span></span><span class=GramE>(</span><span class=string>'<span
655class=SpellE>junk_dbase</span>'</span>)</pre>
656
657<h2>Confirm that deletion succeeded<a name=8></a></h2>
658
659<pre style='margin-left:22.5pt;line-height:normal'><span class=SpellE><span
660class=GramE>dblist</span></span></pre><pre style='line-height:normal'><span
661class=SpellE><span class=GramE><span style='color:gray;mso-bidi-font-style:
662italic'>ans</span></span></span><span style='color:gray;mso-bidi-font-style:
663italic'> = <o:p></o:p></span></pre><pre style='line-height:normal'><span
664style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>    </span>'<span
665class=SpellE>information_schema</span>'<o:p></o:p></span></pre><pre
666style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>    </span>'<span
667class=SpellE><span class=GramE>mysql</span></span>'<o:p></o:p></span></pre>
668
669<h2>Add a new database<a name=9></a><span style='color:#990000'><o:p></o:p></span></h2>
670
671<pre style='margin-left:22.5pt;line-height:normal'><span class=SpellE><span
672class=GramE>dbadd</span></span><span class=GramE>(</span><span class=string>'<span
673class=SpellE>test_dbase</span>'</span>)</pre>
674
675<h2>Open the new database<a name=10></a></h2>
676
677<pre style='margin-left:22.5pt;line-height:normal'><span class=SpellE><span
678class=GramE>dbopen</span></span><span class=GramE>(</span><span class=string>'<span
679class=SpellE>test_dbase</span>'</span>)</pre>
680
681<h2>Verify that the new database is current<a name=11></a></h2>
682
683<pre style='margin-left:22.5pt;line-height:normal'><span class=SpellE><span
684class=GramE>dbcurr</span></span></pre><pre style='line-height:normal'><span
685class=SpellE><span class=GramE><span style='color:gray;mso-bidi-font-style:
686italic'>ans</span></span></span><span style='color:gray;mso-bidi-font-style:
687italic'> =<o:p></o:p></span></pre><pre style='line-height:normal'><span
688class=SpellE><span style='color:gray;mso-bidi-font-style:italic'>test_dbase</span></span><span
689style='color:gray;mso-bidi-font-style:italic'><o:p></o:p></span></pre>
690
691<h2>List tables present in current database<a name=12></a><span
692style='color:#990000'><o:p></o:p></span></h2>
693
694<pre style='margin-left:22.5pt;line-height:normal'><span class=GramE>tblist</span></pre><pre
695style='line-height:normal'><span class=SpellE><span class=GramE><span
696style='color:gray;mso-bidi-font-style:italic'>ans</span></span></span><span
697style='color:gray;mso-bidi-font-style:italic'> = <o:p></o:p></span></pre><pre
698style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>   </span>Empty cell array: 0-by-1<o:p></o:p></span></pre>
699
700<h2>Add a new table<a name=13></a><span style='color:#990000'><o:p></o:p></span></h2>
701
702<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>Note
703that input cell arrays can be constructed programmatically, using loops</p>
704
705<pre style='line-height:normal'><span class=GramE>for</span> i = 1:100</pre><pre
706style='line-height:normal'><span style='mso-spacerun:yes'>  </span><span
707class=GramE>type{</span>i} = ‘<span class=SpellE>varchar</span>(20)’;</pre><pre
708style='line-height:normal'><span class=GramE>end</span></pre>
709
710<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
711class=GramE>or</span> edited in Excel and imported to Matlab</p>
712
713<pre style='line-height:normal'><span class=GramE>names</span> = <span
714class=SpellE>xlsread</span>('Book1.xls',1,'A1:A10');</pre><pre
715style='line-height:normal'><span class=GramE>types</span> = <span class=SpellE>xlsread</span>('Book1.xls',1,'B1:B10');</pre>
716
717<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>In
718both cases, cell arrays <span class=SpellE>ouput</span> by a prior TBATTR
719command can be used.</p>
720
721<pre style='line-height:normal'>[<span class=SpellE>old_names<span class=GramE>,old</span>_types</span>] = <span
722class=SpellE><span class=GramE>tbattr</span></span><span class=GramE>(</span>'<span
723class=SpellE>old_table</span>');</pre><pre style='line-height:normal'><span
724class=SpellE>new_names</span> = <span class=SpellE>old_names</span>;</pre><pre
725style='line-height:normal'><span class=SpellE>new_<span class=GramE>names</span></span><span
726class=GramE>{</span>1} = 'x';</pre><pre style='line-height:normal'><o:p>&nbsp;</o:p></pre><pre
727style='margin-left:22.5pt;line-height:normal'><span class=SpellE><span
728class=GramE>tbadd</span></span><span class=GramE>(</span><span class=string>'<span
729class=SpellE>test_tabble</span>'</span>,{<span class=string>'<span
730class=SpellE>number'<span style='color:windowtext'>,</span>'name</span>'</span>},{<span
731class=string>'double(16,2)'</span>,<span class=string>'<span class=SpellE>varchar</span>(10)'</span>})</pre>
732
733<h2>Verify that the table was created<a name=16></a></h2>
734
735<pre style='margin-left:22.5pt;line-height:normal'><span class=GramE>tblist</span></pre><pre
736style='line-height:normal'><span class=SpellE><span class=GramE><span
737style='color:gray;mso-bidi-font-style:italic'>ans</span></span></span><span
738style='color:gray;mso-bidi-font-style:italic'> = <o:p></o:p></span></pre><pre
739style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>    </span>'<span
740class=SpellE>test_tabble</span>'<o:p></o:p></span></pre>
741
742<h2>Correct the typo in table's name<a name=17></a><span style='color:#990000'><o:p></o:p></span></h2>
743
744<pre style='margin-left:22.5pt;line-height:normal'><span class=SpellE><span
745class=GramE>tbrename</span></span><span class=GramE>(</span><span class=string>'<span
746class=SpellE>test_tabble'<span style='color:windowtext'>,</span>'test_table</span>'</span>)</pre>
747
748<h2>Display attributes and size of the table<a name=18></a></h2>
749
750<pre style='margin-left:22.5pt;line-height:normal'><span class=SpellE><span
751class=GramE>tbattr</span></span><span class=GramE>(</span><span class=string>'<span
752class=SpellE>test_table</span>'</span>)</pre><pre style='line-height:normal'><span
753class=SpellE><span class=GramE><span style='color:gray;mso-bidi-font-style:
754italic'>ans</span></span></span><span style='color:gray;mso-bidi-font-style:
755italic'> = <o:p></o:p></span></pre><pre style='line-height:normal'><span
756style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>    </span>'<span
757class=GramE>number</span>'<o:p></o:p></span></pre><pre style='text-indent:24.0pt;
758line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'>'<span
759class=GramE>name</span>'<o:p></o:p></span></pre><pre style='text-indent:24.0pt;
760line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><o:p>&nbsp;</o:p></span></pre><pre
761style='margin-left:22.5pt;line-height:normal'>[<span class=GramE>names</span>, types] = <span
762class=SpellE><span class=GramE>tbattr</span></span><span class=GramE>(</span><span
763class=string>'<span class=SpellE>test_table</span>'</span>)</pre><pre
764style='line-height:normal'><span class=GramE><span style='color:gray;
765mso-bidi-font-style:italic'>names</span></span><span style='color:gray;
766mso-bidi-font-style:italic'> = <o:p></o:p></span></pre><pre style='line-height:
767normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>   </span><span style='mso-spacerun:yes'> </span>'<span
768class=GramE>number</span>'<o:p></o:p></span></pre><pre style='line-height:normal'><span
769style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>    </span>'<span
770class=GramE>name</span>'<o:p></o:p></span></pre><pre style='line-height:normal'><span
771class=GramE><span style='color:gray;mso-bidi-font-style:italic'>types</span></span><span
772style='color:gray;mso-bidi-font-style:italic'> = <o:p></o:p></span></pre><pre
773style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>    </span><span
774class=GramE>'double(</span>16,2)'<o:p></o:p></span></pre><pre style='text-indent:
77524.0pt;line-height:normal'><span class=GramE><span style='color:gray;
776mso-bidi-font-style:italic'>'<span class=SpellE>varchar</span>(</span></span><span
777style='color:gray;mso-bidi-font-style:italic'>10)'<o:p></o:p></span></pre><pre
778style='text-indent:24.0pt;line-height:normal'><span style='color:gray;
779mso-bidi-font-style:italic'><o:p>&nbsp;</o:p></span></pre><pre
780style='margin-left:22.5pt;line-height:normal'><span class=SpellE><span
781class=GramE>tbsize</span></span><span class=GramE>(</span><span class=string>'<span
782class=SpellE>test_table</span>'</span>)</pre><pre style='line-height:normal'><span
783class=SpellE><span class=GramE><span style='color:gray;mso-bidi-font-style:
784italic'>ans</span></span></span><span style='color:gray;mso-bidi-font-style:
785italic'> =<o:p></o:p></span></pre><pre style='line-height:normal'><span
786style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>     </span>0<span style='mso-spacerun:yes'>     </span>2<o:p></o:p></span></pre>
787
788<h2>Populate the table with TBWRITE<a name=21></a><span style='color:#990000'><o:p></o:p></span></h2>
789
790<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>Having
791to define variables global for read/write operations is a controversial feature
792of TBREAD and TBWRITE design.</p>
793
794<pre style='margin-left:22.5pt;line-height:normal'><span class=GramE><span
795class=keyword>global</span></span> <span class=SpellE>dayNumbers</span> <span
796class=SpellE>dayNames</span></pre><pre style='margin-left:22.5pt;line-height:
797normal'><span class=SpellE><span class=GramE>dayNumbers</span></span> = 1:7;</pre><pre
798style='margin-left:22.5pt;line-height:normal'><span class=SpellE>dayNames</span><span style='mso-spacerun:yes'>   </span>= {<span
799class=string>'Monday'</span>,<span class=string>'Tuesday'</span>,<span
800class=string>'Wednesday'</span>,<span class=string>'Thursday'</span>,<span
801class=string>'Friday'</span>,<span class=string>'Saturday'</span>,<span
802class=string>'Sunday'</span>};</pre><pre style='margin-left:22.5pt;line-height:
803normal'><span class=SpellE><span class=GramE>tbwrite</span></span><span
804class=GramE>(</span><span class=string>'<span class=SpellE>test_table</span>'</span>,{<span
805class=string>'<span class=SpellE>dayNumbers'<span style='color:windowtext'>,</span>'dayNames</span>'</span>},{<span
806class=string>'<span class=SpellE>number'<span style='color:windowtext'>,</span>'name</span>'</span>})</pre>
807
808<h2>Display contents of the table<a name=23></a></h2>
809
810<pre style='margin-left:22.5pt;line-height:normal'><span class=SpellE><span
811class=GramE>tbprint</span></span><span class=GramE>(</span><span class=string>'<span
812class=SpellE>test_table</span>'</span>)</pre><pre style='line-height:normal'><span
813style='color:gray;mso-bidi-font-style:italic'><o:p>&nbsp;</o:p></span></pre><pre
814style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>  </span><span
815class=GramE>number</span><span style='mso-spacerun:yes'>   </span>name<span style='mso-spacerun:yes'>      </span><o:p></o:p></span></pre><pre
816style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'> </span>+------+ +---------+<o:p></o:p></span></pre><pre
817style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>  </span>1.00<span style='mso-spacerun:yes'>     </span>Monday<span style='mso-spacerun:yes'>    </span><o:p></o:p></span></pre><pre
818style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>  </span>2.00<span style='mso-spacerun:yes'>     </span>Tuesday<span style='mso-spacerun:yes'>   </span><o:p></o:p></span></pre><pre
819style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>  </span>3.00<span style='mso-spacerun:yes'>     </span>Wednesday <o:p></o:p></span></pre><pre
820style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>  </span>4.00<span style='mso-spacerun:yes'>     </span>Thursday<span style='mso-spacerun:yes'>  </span><o:p></o:p></span></pre><pre
821style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'> </span><span style='mso-spacerun:yes'> </span>5.00<span style='mso-spacerun:yes'>     </span>Friday<span style='mso-spacerun:yes'>    </span><o:p></o:p></span></pre><pre
822style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>  </span>6.00<span style='mso-spacerun:yes'>     </span>Saturday<span style='mso-spacerun:yes'>  </span><o:p></o:p></span></pre><pre
823style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>  </span>7.00<span style='mso-spacerun:yes'>     </span>Sunday<span style='mso-spacerun:yes'>    </span><o:p></o:p></span></pre><pre
824style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><o:p>&nbsp;</o:p></span></pre>
825
826<h2>Read from the table using TBREAD<a name=24></a><span style='color:#990000'><o:p></o:p></span></h2>
827
828<pre style='margin-left:22.5pt;line-height:normal'><span class=GramE><span
829class=keyword>global</span></span> <span class=SpellE>weekdayNumbers</span> <span
830class=SpellE>weekdayNames</span></pre><pre style='margin-left:22.5pt;
831line-height:normal'><span class=SpellE><span class=GramE>tbread</span></span><span
832class=GramE>(</span><span class=string>'<span class=SpellE>test_table</span>'</span>,{<span
833class=string>'<span class=SpellE>weekdayNumbers'<span style='color:windowtext'>,</span>'weekdayNames</span>'</span>},{<span
834class=string>'<span class=SpellE>number'<span style='color:windowtext'>,</span>'name</span>'</span>},<span
835class=string>'where number &lt; 6'</span>)</pre>
836
837<h2>Display new variables<a name=25></a></h2>
838
839<pre style='margin-left:22.5pt;line-height:normal'><span class=SpellE><span
840class=GramE>weekdayNumbers</span></span></pre><pre style='margin-left:22.5pt;
841line-height:normal'><span class=SpellE><span class=GramE>weekdayNames</span></span></pre><pre
842style='line-height:normal'><span class=SpellE><span class=GramE><span
843style='color:gray;mso-bidi-font-style:italic'>weekdayNumbers</span></span></span><span
844style='color:gray;mso-bidi-font-style:italic'> =<o:p></o:p></span></pre><pre
845style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>     </span>1<o:p></o:p></span></pre><pre
846style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>     </span>2<o:p></o:p></span></pre><pre
847style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>     </span>3<o:p></o:p></span></pre><pre
848style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>     </span>4<o:p></o:p></span></pre><pre
849style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'> <span style='mso-spacerun:yes'> </span><span style='mso-spacerun:yes'>   </span>5<o:p></o:p></span></pre><pre
850style='line-height:normal'><span class=SpellE><span class=GramE><span
851style='color:gray;mso-bidi-font-style:italic'>weekdayNames</span></span></span><span
852style='color:gray;mso-bidi-font-style:italic'> = <o:p></o:p></span></pre><pre
853style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>    </span>'Monday'<o:p></o:p></span></pre><pre
854style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>    </span>'Tuesday'<o:p></o:p></span></pre><pre
855style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>    </span>'Wednesday'<o:p></o:p></span></pre><pre
856style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>  </span><span style='mso-spacerun:yes'>  </span>'Thursday'<o:p></o:p></span></pre><pre
857style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>    </span>'Friday'<o:p></o:p></span></pre>
858
859<h2>Close MySQL<a name=26></a> connection<span style='color:#990000'><o:p></o:p></span></h2>
860
861<pre style='margin-left:22.5pt;line-height:normal'><span class=SpellE><span
862class=GramE>myclose</span></span></pre>
863
864<p class=footer style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
865style='font-style:normal;mso-bidi-font-style:italic'><br style='mso-special-character:
866line-break'>
867<![if !supportLineBreakNewLine]><br style='mso-special-character:line-break'>
868<![endif]><o:p></o:p></span></p>
869
870</div>
871
872<!--
873##### SOURCE BEGIN #####
874%% List functions available for interacting with MySQL
875lookfor mysql
876%%
877% Presence of MYM.M is required.
878
879%% Check connection status
880myopen
881
882%% Start an instance of MySQL 
883%%
884% (The instance is hidden; no new windows appear).
885mystart('localhost','root','zhir5')
886
887%% List available databases     
888dblist
889
890%% Delete an un-needed database
891dbdrop('junk_dbase')
892
893%% Confirm that deletion succedded
894dblist
895
896%% Add a new database
897dbadd('test_dbase')
898
899%% Open the new database
900dbopen('test_dbase')
901
902%% Verify that the new database is current
903dbcurr
904
905%% List tables present in current database
906tblist
907
908%% Add a new table
909%%
910% Note that input cell arrays can be constructed programmatically, using
911% loops
912%
913% for i = 1:100
914%
915%    type{i} = varchar(20);
916%
917% end
918%
919% or edited in Excel and imported to Matlab
920%
921% names = xlsread('Book1.xls',1,'A1:A10');
922%
923% types = xlsread('Book1.xls',1,'B1:B10');
924%
925% In both cases, cell arrays ouput by a prior TBATTR command can be used.
926%
927% [old_names,old_types] = tbattr('old_table');
928%
929% new_names = old_names;
930%
931% new_names{1} = 'x';
932%%
933tbadd('test_tabble',{'number','name'},{'double(16,2)','varchar(10)'})
934
935%% Verify that the table was created
936tblist
937
938%% Correct the typo in table's name
939tbrename('test_tabble','test_table')
940
941%% Display attributes and size of the table
942tbattr('test_table')
943%%
944[names, types] = tbattr('test_table')
945%%
946tbsize('test_table')
947
948%% Populate the table with TBWRITE
949%%
950% Having to define variables global for read/write operations is a
951% controversial feature of TBREAD and TBWRITE design.
952global dayNumbers dayNames
953dayNumbers = 1:7;
954dayNames   = {'Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'};
955tbwrite('test_table',{'dayNumbers','dayNames'},{'number','name'})
956
957%% Display contents of the table
958tbprint('test_table')
959
960%% Read from the table using TBREAD
961global weekdayNumbers weekdayNames
962tbread('test_table',{'number','name'},{'weekdayNumbers','weekdayNames'},'where number < 6')
963
964%% Display new variables
965weekdayNumbers
966weekdayNames
967
968%% Close MySQL
969myclose
970##### SOURCE END #####
971-->
972</body>
973
974</html>
Note: See TracBrowser for help on using the repository browser.