If got a problem in a mysql select string. I get some data from a mysql table and want use some data to pull data from another table. When I use static (i typed it in) it works good but when i use the data that i got from the mysql database it returns nothing. When i "echo" the select string it shows me the good string. Can someone help me? Sorry if its a stupid question i'am just a starter.
Thanx a lot
Rob
<?PHP
$naam1 = trim($naam);
werknemers($naam1);
function werknemers($test)
{
$select_query_werknemers = "SELECT * FROM `werknemers` WHERE Domeinnaam = '$test'";
$resultwerknemers = mysql_query($select_query_werknemers);
if ($resultwerknemers) {
echo $select_query_werknemers; //shows the right string: SELECT * FROM `werknemers` WHERE Domeinnaam = '...'
$rowwerknemers = mysql_fetch_row($resultwerknemers);
print_r($rowwerknemers); //Shows nothing
$volledigenaam = $rowwerknemers[1];
echo $volledigenaam; //shows nothing
return $volledigenaam;
}
else {
$volledigenaam = "Niet gevonden";
}
//while ( $rowwerknemers = mysql_fetch_row($resultwerknemers)){
// echo $rowwerknemers['Volledige Naam'];
//}
}
?>