~dkuhlman/python-training-materials/Materials

« back to all changes in this revision

Viewing changes to Code_python/Database/py_db_api.html

  • Committer: Dave Kuhlman
  • Date: 2015-10-09 19:50:18 UTC
  • mfrom: (35.1.6 Materials)
  • Revision ID: dkuhlman@davekuhlman.org-20151009195018-8rfrdur2zxdjn5ds
Merge after training at Cisco 10/05/2015

Show diffs side-by-side

added added

removed removed

Lines of Context:
212
212
<li>This table has the following fields: &quot;p_name&quot;, &quot;p_descrip&quot;, and
213
213
&quot;p_rating&quot;.</li>
214
214
</ul>
 
215
<p>Here are some SQL queries that you may find helpful:</p>
 
216
<pre class="literal-block">
 
217
sql = 'select * from plants'
 
218
sql = 'select * from plants where p_name = banana'
 
219
sql = 'insert into plants values (
 
220
sql = 'insert into plants values (&quot;tangerine&quot;, &quot;sweet and juicy&quot;, &quot;9&quot;)
 
221
sql = 'delete from plants where p_name = &quot;peach&quot;'
 
222
sql = 'update plants set p_descrip = &quot;most amazing fruit&quot; where p_name = &quot;banana&quot;'
 
223
</pre>
215
224
<ol class="arabic">
216
225
<li><p class="first">Open/create a connection to the database.</p>
217
226
</li>
307
316
<div class="footer">
308
317
<hr class="footer" />
309
318
<a class="reference external" href="py_db_api.txt">View document source</a>.
310
 
Generated on: 2015-10-03 00:12 UTC.
 
319
Generated on: 2015-10-05 05:02 UTC.
311
320
Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
312
321
 
313
322
</div>