Why the Freckle didn't you post the code that actually used to get the results you are complaining about. Once I got the data loaded, your query wouldn't even run without corrections to column names.
Anyway - the answer to your question...
They are in the wrong order because you order by your generated qNo column. I'd give up on that method.
If you are using MariaDB, you can ORDER BY NATURAL_SORT_KEY(Q_id)
If MySQL (which doesn't have that function), use FetchAll() to get an array of your results then natsort($results) use a custom sort which does a strnatcmp() on the Q_id column
$res = $pdo->query(" ... ");
$result = $res->FetchAll();
usort($results, fn($a,$b)=>strnatcmp($a['Q_id'], $b['Q_id']));
(Using sort($results) would have sorted using the values of the first column in each row - I assumed natsort() would do the same (silly me) )