Error in PHP with Mysql
- by maltad
Hello, Im starting to learn PHP. When I run the script it had an error that said: "Assigned Employee:resource(6) of type (mysql result)" . Please help me and sorry for my bad English Here is the code:
include_once 'rnheader.php';
include_once 'rnfunctions.php';
echo '';
echo ' Assigned Employee:';
$query = "SELECT UserName FROM employee where Classification_ClassificationID = '2'";
$result = queryMysql($query);
if (!queryMysql($query)) {
echo "Query fail: $query" .
mysql_error() . "";
}
else
{
var_dump($result);
exit;
echo ''; // or name="toinsert[]"
while ($row = mysqli_fetch_array($result)) {
echo ''
. htmlspecialchars($row['UserName'])
. '';
}
}
echo '';
?