Problem is that the mangos developers sucked at making coherent database models. As a result, there is no 'field' for either gender nor level - instead, it is part of a big data field containing numerous entries.
First, you must obtain this data as a whole (there are features in MySQL to only substract that which you need, but in my experience it's usually faster to load a bit more data into memory than perform slow algorithms at retrieval time). If you have some experience running queries on your databases, this should not be all too hard:
PHP Code:
SELECT `data`,
`name`
FROM `characters`
For your site you'll probably want to join on other tables as well, but this gives you the names and data of your characters at least.
Generally, your DBAL will return the result in either an array or object (depending on wether you use mysql_fetch_assoc or mysql_fetch_object). I'll assume you did the first, since it's more intuitive to work with in my experience:
PHP Code:
foreach ($result as $row) {
$data = explode(' ', $row['data']);
echo $row['name'] . ' ' . $data[34] . '<br>';
}
This gives you a list of characters with their level - the 34th entry in the data column. There is undoubtedly also a field in there for gender, but I do not know which one that might be - I assume it can be found in other websites though.