After you finish a script, you need to test it. Usually testing a script results in a large amount of errors, or basic conceptual problems.
When a programmer faces these problems, he starts debugging: going over each line of code that might cause the problem. If he doesn't find it immediately, he strips the code untill the most elementary code is left. Then he tests again, if it works, he adds a small piece of the original code, and tests again. And so on, till all bugs are fixed and all code is up and running
At the moment you're facing a small problem: a query isn't fetching what it's supposed to do. So, going from what I just wrote: strip the query down to the most basic query:
The query above will probably cause no problems at all, so add 1 WHERE clause:
SQL Code:
SELECT * FROM aanbod WHERE soort REGEXP '[[:alnum:]]'
Test if this is working. If not, you found at least one of the problems in the query. If it is working, add another where clause. Keep repating this untill you solved all problems and the query returns exactly what you need.
Don't get me wrong: I do want to help you, but you have to make an effort yourself: if you're just going to ask "what's it/what am I doing wrong?", you won't learn anything from it