Skip to content

Language

Sign in

← Back to the lesson

🔬 Computer science · Class 12 · virtual lab

Python with MySQL: safe queries

Goal: Follow the connect, execute and fetch steps of a Python and MySQL program and see why placeholders beat joined strings.

  1. Predict
  2. Try
  3. Observe
  4. Record
  5. Explain
  6. Check

Loading the lab…

About this lab

Behind the experiment.

What this lab simplifies

  • The student table is the same eight made-up rows used in the SQL lab.
  • Only one SELECT on one table is shown.
  • Real MySQL drivers may refuse several statements in one call; the lab only shows quote and OR tricks.

No screen? Use paper.

The activity sheet has the same steps, a results table and the questions, ready to print.

Printable activity sheet (paper version)All labs

Python with MySQL: safe queries: virtual lab · EduFlint