1 | <html xmlns:v="urn:schemas-microsoft-com:vml" |
---|
2 | xmlns:o="urn:schemas-microsoft-com:office:office" |
---|
3 | xmlns:w="urn:schemas-microsoft-com:office:word" |
---|
4 | xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd" |
---|
5 | xmlns="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" );} |
---|
46 | h1 |
---|
47 | {max-width: 600px; |
---|
48 | width:expression(document.body.clientWidth > 620 ? "600px": "auto" );} |
---|
49 | h2 |
---|
50 | {max-width: 600px; |
---|
51 | width:expression(document.body.clientWidth > 620 ? "600px": "auto" );} |
---|
52 | div |
---|
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;} |
---|
89 | h1 |
---|
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;} |
---|
101 | h2 |
---|
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;} |
---|
114 | a: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;} |
---|
126 | a:visited, span.MsoHyperlinkFollowed |
---|
127 | {color:blue; |
---|
128 | text-decoration:underline; |
---|
129 | text-underline:single;} |
---|
130 | p |
---|
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";} |
---|
139 | pre |
---|
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";} |
---|
148 | p.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;} |
---|
161 | span.keyword |
---|
162 | {mso-style-name:keyword; |
---|
163 | color:blue;} |
---|
164 | span.comment |
---|
165 | {mso-style-name:comment; |
---|
166 | color:forestgreen;} |
---|
167 | span.string |
---|
168 | {mso-style-name:string; |
---|
169 | color:#A020F0;} |
---|
170 | span.untermstring |
---|
171 | {mso-style-name:untermstring; |
---|
172 | color:#B20000;} |
---|
173 | span.syscmd |
---|
174 | {mso-style-name:syscmd; |
---|
175 | color:#B28C00;} |
---|
176 | span.SpellE |
---|
177 | {mso-style-name:""; |
---|
178 | mso-spl-e:yes;} |
---|
179 | span.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;} |
---|
188 | div.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;} |
---|
347 | ol |
---|
348 | {margin-bottom:0in;} |
---|
349 | ul |
---|
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> |
---|
371 | p.MsoNormal |
---|
372 | {margin-left:7.5pt;} |
---|
373 | </style> |
---|
374 | <![endif]><!-- |
---|
375 | This HTML is auto-generated from an M-file. |
---|
376 | To 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; |
---|
389 | margin-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; |
---|
398 | margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span |
---|
399 | style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol; |
---|
400 | mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span |
---|
401 | style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> |
---|
402 | </span></span></span><![endif]><span style='color:#333300'><a href="#1"><span |
---|
403 | style='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; |
---|
406 | margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span |
---|
407 | style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol; |
---|
408 | mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span |
---|
409 | style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> |
---|
410 | </span></span></span><![endif]><span style='color:#333300'><a href="#3"><span |
---|
411 | style='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; |
---|
414 | margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span |
---|
415 | style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol; |
---|
416 | mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span |
---|
417 | style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> |
---|
418 | </span></span></span><![endif]><span style='color:#333300'><a href="#4"><span |
---|
419 | style='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; |
---|
422 | margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span |
---|
423 | style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol; |
---|
424 | mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span |
---|
425 | style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> |
---|
426 | </span></span></span><![endif]><span style='color:#333300'><a href="#6"><span |
---|
427 | style='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; |
---|
430 | margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span |
---|
431 | style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol; |
---|
432 | mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span |
---|
433 | style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> |
---|
434 | </span></span></span><![endif]><span style='color:#333300'><a href="#7"><span |
---|
435 | style='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; |
---|
438 | margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span |
---|
439 | style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol; |
---|
440 | mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span |
---|
441 | style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> |
---|
442 | </span></span></span><![endif]><span style='color:#333300'><a href="#8"><span |
---|
443 | style='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; |
---|
446 | margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span |
---|
447 | style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol; |
---|
448 | mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span |
---|
449 | style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> |
---|
450 | </span></span></span><![endif]><span style='color:#333300'><a href="#9"><span |
---|
451 | style='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; |
---|
454 | margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span |
---|
455 | style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol; |
---|
456 | mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span |
---|
457 | style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> |
---|
458 | </span></span></span><![endif]><span style='color:#333300'><a href="#10"><span |
---|
459 | style='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; |
---|
462 | margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span |
---|
463 | style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol; |
---|
464 | mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span |
---|
465 | style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> |
---|
466 | </span></span></span><![endif]><span style='color:#333300'><a href="#11"><span |
---|
467 | style='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; |
---|
470 | margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span |
---|
471 | style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol; |
---|
472 | mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span |
---|
473 | style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> |
---|
474 | </span></span></span><![endif]><span style='color:#333300'><a href="#12"><span |
---|
475 | style='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; |
---|
478 | margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span |
---|
479 | style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol; |
---|
480 | mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span |
---|
481 | style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> |
---|
482 | </span></span></span><![endif]><span style='color:#333300'><a href="#13"><span |
---|
483 | style='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; |
---|
486 | margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span |
---|
487 | style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol; |
---|
488 | mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span |
---|
489 | style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> |
---|
490 | </span></span></span><![endif]><span style='color:#333300'><a href="#16"><span |
---|
491 | style='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; |
---|
494 | margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span |
---|
495 | style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol; |
---|
496 | mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span |
---|
497 | style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> |
---|
498 | </span></span></span><![endif]><span style='color:#333300'><a href="#17"><span |
---|
499 | style='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; |
---|
502 | margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span |
---|
503 | style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol; |
---|
504 | mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span |
---|
505 | style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> |
---|
506 | </span></span></span><![endif]><span style='color:#333300'><a href="#18"><span |
---|
507 | style='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; |
---|
510 | margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span |
---|
511 | style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol; |
---|
512 | mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span |
---|
513 | style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> |
---|
514 | </span></span></span><![endif]><span style='color:#333300'><a href="#21"><span |
---|
515 | style='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; |
---|
518 | margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span |
---|
519 | style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol; |
---|
520 | mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span |
---|
521 | style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> |
---|
522 | </span></span></span><![endif]><span style='color:#333300'><a href="#23"><span |
---|
523 | style='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; |
---|
526 | margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span |
---|
527 | style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol; |
---|
528 | mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span |
---|
529 | style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> |
---|
530 | </span></span></span><![endif]><span style='color:#333300'><a href="#24"><span |
---|
531 | style='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; |
---|
534 | margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span |
---|
535 | style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol; |
---|
536 | mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span |
---|
537 | style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> |
---|
538 | </span></span></span><![endif]><span style='color:#333300'><a href="#25"><span |
---|
539 | style='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; |
---|
542 | margin-left:27.0pt;text-indent:-.25in;mso-list:l0 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span |
---|
543 | style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol; |
---|
544 | mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:#333300'><span |
---|
545 | style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> |
---|
546 | </span></span></span><![endif]><span style='color:#333300'><a href="#26"><span |
---|
547 | style='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 |
---|
554 | class=GramE>lookfor</span></span> <span class=SpellE><span class=string>mysql</span></span><span |
---|
555 | class=string><o:p></o:p></span></pre><pre style='margin-left:22.5pt;line-height: |
---|
556 | normal'><span style='color:gray'><o:p> </o:p></span></pre><pre |
---|
557 | style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt; |
---|
558 | margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style: |
---|
559 | italic'> MYM - Interact with a MySQL database server <o:p></o:p></span></pre><pre |
---|
560 | style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt; |
---|
561 | margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style: |
---|
562 | italic'><span style='mso-spacerun:yes'>Â </span>DBADD<span style='mso-spacerun:yes'>Â Â Â Â </span>Create a MySQL database <o:p></o:p></span></pre><pre |
---|
563 | style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt; |
---|
564 | margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style: |
---|
565 | italic'><span style='mso-spacerun:yes'>Â </span>DBCURR<span style='mso-spacerun:yes'>Â Â Â </span>Show current MySQL database<o:p></o:p></span></pre><pre |
---|
566 | style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt; |
---|
567 | margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style: |
---|
568 | italic'> DBDROP<span style='mso-spacerun:yes'>Â Â Â </span>Delete a MySQL database <o:p></o:p></span></pre><pre |
---|
569 | style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt; |
---|
570 | margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style: |
---|
571 | italic'><span style='mso-spacerun:yes'>Â </span>DBLIST<span style='mso-spacerun:yes'>Â Â Â </span>List available MySQL databases <o:p></o:p></span></pre><pre |
---|
572 | style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt; |
---|
573 | margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style: |
---|
574 | italic'><span style='mso-spacerun:yes'>Â </span>DBOPEN<span style='mso-spacerun:yes'>Â Â Â </span>Open a MySQL database <o:p></o:p></span></pre><pre |
---|
575 | style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt; |
---|
576 | margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style: |
---|
577 | italic'><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 |
---|
578 | style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt; |
---|
579 | margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style: |
---|
580 | italic'> MYCHECK<span style='mso-spacerun:yes'>Â Â </span>Show status of MySQL connection <o:p></o:p></span></pre><pre |
---|
581 | style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt; |
---|
582 | margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style: |
---|
583 | italic'><span style='mso-spacerun:yes'>Â </span>MYCLOSE<span style='mso-spacerun:yes'>Â Â </span>Disconnect from MySQL<o:p></o:p></span></pre><pre |
---|
584 | style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt; |
---|
585 | margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style: |
---|
586 | italic'> MYOPEN<span style='mso-spacerun:yes'>Â Â Â </span>Connect to MySQL <o:p></o:p></span></pre><pre |
---|
587 | style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt; |
---|
588 | margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style: |
---|
589 | italic'><span style='mso-spacerun:yes'>Â </span>TBADD<span style='mso-spacerun:yes'>Â Â Â Â </span>Create a MySQL table <o:p></o:p></span></pre><pre |
---|
590 | style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt; |
---|
591 | margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style: |
---|
592 | italic'><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 |
---|
593 | style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt; |
---|
594 | margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style: |
---|
595 | italic'> TBDROP<span style='mso-spacerun:yes'>Â Â Â </span>Delete a MySQL table<o:p></o:p></span></pre><pre |
---|
596 | style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt; |
---|
597 | margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style: |
---|
598 | italic'> TBLIST<span style='mso-spacerun:yes'>Â Â Â </span>List tables in a MySQL database <o:p></o:p></span></pre><pre |
---|
599 | style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt; |
---|
600 | margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style: |
---|
601 | italic'><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 |
---|
602 | style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt; |
---|
603 | margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style: |
---|
604 | italic'> TBREAD<span style='mso-spacerun:yes'>Â Â Â </span>Read from a MySQL table <o:p></o:p></span></pre><pre |
---|
605 | style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt; |
---|
606 | margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style: |
---|
607 | italic'><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 |
---|
608 | style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt; |
---|
609 | margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style: |
---|
610 | italic'> TBSIZE<span style='mso-spacerun:yes'>Â Â Â </span>Show size of a MySQL table <o:p></o:p></span></pre><pre |
---|
611 | style='margin-top:0in;margin-right:7.5pt;margin-bottom:0in;margin-left:7.5pt; |
---|
612 | margin-bottom:.0001pt;line-height:normal'><span style='color:gray;mso-bidi-font-style: |
---|
613 | italic'><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 |
---|
616 | of 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 |
---|
621 | class=GramE>mycheck</span></span></pre><pre style='line-height:normal'><span |
---|
622 | class=SpellE><span class=GramE><span style='color:gray;mso-bidi-font-style: |
---|
623 | italic'>ans</span></span></span><span style='color:gray;mso-bidi-font-style: |
---|
624 | italic'> =<o:p></o:p></span></pre><pre style='line-height:normal'><span |
---|
625 | style='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 |
---|
630 | instance is hidden; no new windows appear).</p> |
---|
631 | |
---|
632 | <pre style='margin-left:22.5pt;line-height:normal'><span class=SpellE><span |
---|
633 | class=GramE>myopen</span></span><span class=GramE>(</span><span class=string>'<span |
---|
634 | class=SpellE>localhost'<span style='color:windowtext'>,</span>'root'<span |
---|
635 | style='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 |
---|
640 | class=GramE>dblist</span></span></pre><pre style='line-height:normal'><span |
---|
641 | class=SpellE><span class=GramE><span style='color:gray;mso-bidi-font-style: |
---|
642 | italic'>ans</span></span></span><span style='color:gray;mso-bidi-font-style: |
---|
643 | italic'> = <o:p></o:p></span></pre><pre style='line-height:normal'><span |
---|
644 | style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>Â Â Â Â </span>'<span |
---|
645 | class=SpellE>information_schema</span>'<o:p></o:p></span></pre><pre |
---|
646 | style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>Â Â Â </span>'<span |
---|
647 | class=SpellE>junk_dbase</span>'<o:p></o:p></span></pre><pre style='line-height: |
---|
648 | normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>Â Â Â </span>'<span |
---|
649 | class=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 |
---|
654 | class=GramE>dbdrop</span></span><span class=GramE>(</span><span class=string>'<span |
---|
655 | class=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 |
---|
660 | class=GramE>dblist</span></span></pre><pre style='line-height:normal'><span |
---|
661 | class=SpellE><span class=GramE><span style='color:gray;mso-bidi-font-style: |
---|
662 | italic'>ans</span></span></span><span style='color:gray;mso-bidi-font-style: |
---|
663 | italic'> = <o:p></o:p></span></pre><pre style='line-height:normal'><span |
---|
664 | style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>Â Â Â Â </span>'<span |
---|
665 | class=SpellE>information_schema</span>'<o:p></o:p></span></pre><pre |
---|
666 | style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>Â Â Â </span>'<span |
---|
667 | class=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 |
---|
672 | class=GramE>dbadd</span></span><span class=GramE>(</span><span class=string>'<span |
---|
673 | class=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 |
---|
678 | class=GramE>dbopen</span></span><span class=GramE>(</span><span class=string>'<span |
---|
679 | class=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 |
---|
684 | class=GramE>dbcurr</span></span></pre><pre style='line-height:normal'><span |
---|
685 | class=SpellE><span class=GramE><span style='color:gray;mso-bidi-font-style: |
---|
686 | italic'>ans</span></span></span><span style='color:gray;mso-bidi-font-style: |
---|
687 | italic'> =<o:p></o:p></span></pre><pre style='line-height:normal'><span |
---|
688 | class=SpellE><span style='color:gray;mso-bidi-font-style:italic'>test_dbase</span></span><span |
---|
689 | style='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 |
---|
692 | style='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 |
---|
695 | style='line-height:normal'><span class=SpellE><span class=GramE><span |
---|
696 | style='color:gray;mso-bidi-font-style:italic'>ans</span></span></span><span |
---|
697 | style='color:gray;mso-bidi-font-style:italic'> = <o:p></o:p></span></pre><pre |
---|
698 | style='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 |
---|
703 | that 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 |
---|
706 | style='line-height:normal'><span style='mso-spacerun:yes'>Â </span><span |
---|
707 | class=GramE>type{</span>i} = â<span class=SpellE>varchar</span>(20)â;</pre><pre |
---|
708 | style='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 |
---|
711 | class=GramE>or</span> edited in Excel and imported to Matlab</p> |
---|
712 | |
---|
713 | <pre style='line-height:normal'><span class=GramE>names</span> = <span |
---|
714 | class=SpellE>xlsread</span>('Book1.xls',1,'A1:A10');</pre><pre |
---|
715 | style='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 |
---|
718 | both cases, cell arrays <span class=SpellE>ouput</span> by a prior TBATTR |
---|
719 | command can be used.</p> |
---|
720 | |
---|
721 | <pre style='line-height:normal'>[<span class=SpellE>old_names<span class=GramE>,old</span>_types</span>] = <span |
---|
722 | class=SpellE><span class=GramE>tbattr</span></span><span class=GramE>(</span>'<span |
---|
723 | class=SpellE>old_table</span>');</pre><pre style='line-height:normal'><span |
---|
724 | class=SpellE>new_names</span> = <span class=SpellE>old_names</span>;</pre><pre |
---|
725 | style='line-height:normal'><span class=SpellE>new_<span class=GramE>names</span></span><span |
---|
726 | class=GramE>{</span>1} = 'x';</pre><pre style='line-height:normal'><o:p> </o:p></pre><pre |
---|
727 | style='margin-left:22.5pt;line-height:normal'><span class=SpellE><span |
---|
728 | class=GramE>tbadd</span></span><span class=GramE>(</span><span class=string>'<span |
---|
729 | class=SpellE>test_tabble</span>'</span>,{<span class=string>'<span |
---|
730 | class=SpellE>number'<span style='color:windowtext'>,</span>'name</span>'</span>},{<span |
---|
731 | class=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 |
---|
736 | style='line-height:normal'><span class=SpellE><span class=GramE><span |
---|
737 | style='color:gray;mso-bidi-font-style:italic'>ans</span></span></span><span |
---|
738 | style='color:gray;mso-bidi-font-style:italic'> = <o:p></o:p></span></pre><pre |
---|
739 | style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>Â Â Â Â </span>'<span |
---|
740 | class=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 |
---|
745 | class=GramE>tbrename</span></span><span class=GramE>(</span><span class=string>'<span |
---|
746 | class=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 |
---|
751 | class=GramE>tbattr</span></span><span class=GramE>(</span><span class=string>'<span |
---|
752 | class=SpellE>test_table</span>'</span>)</pre><pre style='line-height:normal'><span |
---|
753 | class=SpellE><span class=GramE><span style='color:gray;mso-bidi-font-style: |
---|
754 | italic'>ans</span></span></span><span style='color:gray;mso-bidi-font-style: |
---|
755 | italic'> = <o:p></o:p></span></pre><pre style='line-height:normal'><span |
---|
756 | style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>Â Â Â Â </span>'<span |
---|
757 | class=GramE>number</span>'<o:p></o:p></span></pre><pre style='text-indent:24.0pt; |
---|
758 | line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'>'<span |
---|
759 | class=GramE>name</span>'<o:p></o:p></span></pre><pre style='text-indent:24.0pt; |
---|
760 | line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><o:p> </o:p></span></pre><pre |
---|
761 | style='margin-left:22.5pt;line-height:normal'>[<span class=GramE>names</span>, types] = <span |
---|
762 | class=SpellE><span class=GramE>tbattr</span></span><span class=GramE>(</span><span |
---|
763 | class=string>'<span class=SpellE>test_table</span>'</span>)</pre><pre |
---|
764 | style='line-height:normal'><span class=GramE><span style='color:gray; |
---|
765 | mso-bidi-font-style:italic'>names</span></span><span style='color:gray; |
---|
766 | mso-bidi-font-style:italic'> = <o:p></o:p></span></pre><pre style='line-height: |
---|
767 | normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>Â Â Â </span><span style='mso-spacerun:yes'>Â </span>'<span |
---|
768 | class=GramE>number</span>'<o:p></o:p></span></pre><pre style='line-height:normal'><span |
---|
769 | style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>Â Â Â </span>'<span |
---|
770 | class=GramE>name</span>'<o:p></o:p></span></pre><pre style='line-height:normal'><span |
---|
771 | class=GramE><span style='color:gray;mso-bidi-font-style:italic'>types</span></span><span |
---|
772 | style='color:gray;mso-bidi-font-style:italic'> = <o:p></o:p></span></pre><pre |
---|
773 | style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>Â Â Â Â </span><span |
---|
774 | class=GramE>'double(</span>16,2)'<o:p></o:p></span></pre><pre style='text-indent: |
---|
775 | 24.0pt;line-height:normal'><span class=GramE><span style='color:gray; |
---|
776 | mso-bidi-font-style:italic'>'<span class=SpellE>varchar</span>(</span></span><span |
---|
777 | style='color:gray;mso-bidi-font-style:italic'>10)'<o:p></o:p></span></pre><pre |
---|
778 | style='text-indent:24.0pt;line-height:normal'><span style='color:gray; |
---|
779 | mso-bidi-font-style:italic'><o:p> </o:p></span></pre><pre |
---|
780 | style='margin-left:22.5pt;line-height:normal'><span class=SpellE><span |
---|
781 | class=GramE>tbsize</span></span><span class=GramE>(</span><span class=string>'<span |
---|
782 | class=SpellE>test_table</span>'</span>)</pre><pre style='line-height:normal'><span |
---|
783 | class=SpellE><span class=GramE><span style='color:gray;mso-bidi-font-style: |
---|
784 | italic'>ans</span></span></span><span style='color:gray;mso-bidi-font-style: |
---|
785 | italic'> =<o:p></o:p></span></pre><pre style='line-height:normal'><span |
---|
786 | style='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 |
---|
791 | to define variables global for read/write operations is a controversial feature |
---|
792 | of TBREAD and TBWRITE design.</p> |
---|
793 | |
---|
794 | <pre style='margin-left:22.5pt;line-height:normal'><span class=GramE><span |
---|
795 | class=keyword>global</span></span> <span class=SpellE>dayNumbers</span> <span |
---|
796 | class=SpellE>dayNames</span></pre><pre style='margin-left:22.5pt;line-height: |
---|
797 | normal'><span class=SpellE><span class=GramE>dayNumbers</span></span> = 1:7;</pre><pre |
---|
798 | style='margin-left:22.5pt;line-height:normal'><span class=SpellE>dayNames</span><span style='mso-spacerun:yes'>Â Â </span>= {<span |
---|
799 | class=string>'Monday'</span>,<span class=string>'Tuesday'</span>,<span |
---|
800 | class=string>'Wednesday'</span>,<span class=string>'Thursday'</span>,<span |
---|
801 | class=string>'Friday'</span>,<span class=string>'Saturday'</span>,<span |
---|
802 | class=string>'Sunday'</span>};</pre><pre style='margin-left:22.5pt;line-height: |
---|
803 | normal'><span class=SpellE><span class=GramE>tbwrite</span></span><span |
---|
804 | class=GramE>(</span><span class=string>'<span class=SpellE>test_table</span>'</span>,{<span |
---|
805 | class=string>'<span class=SpellE>dayNumbers'<span style='color:windowtext'>,</span>'dayNames</span>'</span>},{<span |
---|
806 | class=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 |
---|
811 | class=GramE>tbprint</span></span><span class=GramE>(</span><span class=string>'<span |
---|
812 | class=SpellE>test_table</span>'</span>)</pre><pre style='line-height:normal'><span |
---|
813 | style='color:gray;mso-bidi-font-style:italic'><o:p> </o:p></span></pre><pre |
---|
814 | style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><span style='mso-spacerun:yes'>Â </span><span |
---|
815 | class=GramE>number</span><span style='mso-spacerun:yes'>Â Â </span>name<span style='mso-spacerun:yes'>Â Â Â Â Â </span><o:p></o:p></span></pre><pre |
---|
816 | style='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 |
---|
817 | style='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 |
---|
818 | style='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 |
---|
819 | style='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 |
---|
820 | style='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 |
---|
821 | style='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 |
---|
822 | style='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 |
---|
823 | style='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 |
---|
824 | style='line-height:normal'><span style='color:gray;mso-bidi-font-style:italic'><o:p> </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 |
---|
829 | class=keyword>global</span></span> <span class=SpellE>weekdayNumbers</span> <span |
---|
830 | class=SpellE>weekdayNames</span></pre><pre style='margin-left:22.5pt; |
---|
831 | line-height:normal'><span class=SpellE><span class=GramE>tbread</span></span><span |
---|
832 | class=GramE>(</span><span class=string>'<span class=SpellE>test_table</span>'</span>,{<span |
---|
833 | class=string>'<span class=SpellE>weekdayNumbers'<span style='color:windowtext'>,</span>'weekdayNames</span>'</span>},{<span |
---|
834 | class=string>'<span class=SpellE>number'<span style='color:windowtext'>,</span>'name</span>'</span>},<span |
---|
835 | class=string>'where number < 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 |
---|
840 | class=GramE>weekdayNumbers</span></span></pre><pre style='margin-left:22.5pt; |
---|
841 | line-height:normal'><span class=SpellE><span class=GramE>weekdayNames</span></span></pre><pre |
---|
842 | style='line-height:normal'><span class=SpellE><span class=GramE><span |
---|
843 | style='color:gray;mso-bidi-font-style:italic'>weekdayNumbers</span></span></span><span |
---|
844 | style='color:gray;mso-bidi-font-style:italic'> =<o:p></o:p></span></pre><pre |
---|
845 | style='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 |
---|
846 | style='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 |
---|
847 | style='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 |
---|
848 | style='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 |
---|
849 | style='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 |
---|
850 | style='line-height:normal'><span class=SpellE><span class=GramE><span |
---|
851 | style='color:gray;mso-bidi-font-style:italic'>weekdayNames</span></span></span><span |
---|
852 | style='color:gray;mso-bidi-font-style:italic'> = <o:p></o:p></span></pre><pre |
---|
853 | style='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 |
---|
854 | style='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 |
---|
855 | style='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 |
---|
856 | style='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 |
---|
857 | style='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 |
---|
862 | class=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 |
---|
865 | style='font-style:normal;mso-bidi-font-style:italic'><br style='mso-special-character: |
---|
866 | line-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 |
---|
875 | lookfor mysql |
---|
876 | %% |
---|
877 | % Presence of MYM.M is required. |
---|
878 | |
---|
879 | %% Check connection status |
---|
880 | myopen |
---|
881 | |
---|
882 | %% Start an instance of MySQL |
---|
883 | %% |
---|
884 | % (The instance is hidden; no new windows appear). |
---|
885 | mystart('localhost','root','zhir5') |
---|
886 | |
---|
887 | %% List available databases |
---|
888 | dblist |
---|
889 | |
---|
890 | %% Delete an un-needed database |
---|
891 | dbdrop('junk_dbase') |
---|
892 | |
---|
893 | %% Confirm that deletion succedded |
---|
894 | dblist |
---|
895 | |
---|
896 | %% Add a new database |
---|
897 | dbadd('test_dbase') |
---|
898 | |
---|
899 | %% Open the new database |
---|
900 | dbopen('test_dbase') |
---|
901 | |
---|
902 | %% Verify that the new database is current |
---|
903 | dbcurr |
---|
904 | |
---|
905 | %% List tables present in current database |
---|
906 | tblist |
---|
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 | %% |
---|
933 | tbadd('test_tabble',{'number','name'},{'double(16,2)','varchar(10)'}) |
---|
934 | |
---|
935 | %% Verify that the table was created |
---|
936 | tblist |
---|
937 | |
---|
938 | %% Correct the typo in table's name |
---|
939 | tbrename('test_tabble','test_table') |
---|
940 | |
---|
941 | %% Display attributes and size of the table |
---|
942 | tbattr('test_table') |
---|
943 | %% |
---|
944 | [names, types] = tbattr('test_table') |
---|
945 | %% |
---|
946 | tbsize('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. |
---|
952 | global dayNumbers dayNames |
---|
953 | dayNumbers = 1:7; |
---|
954 | dayNames = {'Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'}; |
---|
955 | tbwrite('test_table',{'dayNumbers','dayNames'},{'number','name'}) |
---|
956 | |
---|
957 | %% Display contents of the table |
---|
958 | tbprint('test_table') |
---|
959 | |
---|
960 | %% Read from the table using TBREAD |
---|
961 | global weekdayNumbers weekdayNames |
---|
962 | tbread('test_table',{'number','name'},{'weekdayNumbers','weekdayNames'},'where number < 6') |
---|
963 | |
---|
964 | %% Display new variables |
---|
965 | weekdayNumbers |
---|
966 | weekdayNames |
---|
967 | |
---|
968 | %% Close MySQL |
---|
969 | myclose |
---|
970 | ##### SOURCE END ##### |
---|
971 | --> |
---|
972 | </body> |
---|
973 | |
---|
974 | </html> |
---|