Relative Content

Tag Archive for mariadb

Sort by version numbers

I have a column (called versnum in this example) with version numbers. If I sort them with order by versnum I get for example:

Filling database table

I developed a website about TV series. I would to add an episode listing sorted by seasons for each series.

Why does a double dash (–) cause this MariaDB clause to evaluate as true?

As part of our introduction to computer security course, we have a short unit on SQL injections. One of the homework assignments is a basic unsanitized login page. The expected solution is something along the lines of the classic ' or 1=1; -- , but we always welcome students to find unconventional solutions.