Search Results

Search found 2 results on 1 pages for 'maltad'.

Page 1/1 | 1 

  • 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 ''; ?

    Read the article

  • PHP table problem

    - by maltad
    Hello, Im want to create a table that show the values of a mysql table. The problem is that when I open the page I only have the columns name. But I dont see any row. I also want to make a hyperlink of each row. How I will do that. Here is my code: <p> <?php </p> <p> include_once 'rnheader.php'; echo '</br>'; </p> <p> echo '<a href = "rnservices.php"> Create Service</a> '; </p> <p> echo '<table>'; echo '<tr>'; echo '<th>Service ID</th>'; echo '<th>Title</th>'; echo '<th>Description</th>'; echo '<th>Notes</th>'; echo '<th>Submit By</th>'; echo '<th>Assigned Employee</th>'; echo '<th>Assigned Group</th>'; echo '<th>Category</th>'; echo '<th>Status</th>'; echo '<th>Urgency</th>'; echo '<th>Customer</th>'; echo '<th>Day Created</th>'; echo '</tr>'; </p> <p> $query = ("SELECT ServiceID, Title, Description, Notes, SubmitBy, AssignedEmp, " . "AssignedGroup, NameCategory, TipoStatus, TiposUrgencia, CustomerName, DayCreation FROM Service"); $result = queryMysql($query); echo 'Number of Rows: ' . mysql_num_rows($result); </p> <p> while ($row = mysqli_fetch_assoc($result)) { </p> echo '<tr>'; echo '<td>' . $row['ServiceID'] . '</td>'; echo '<td>' . $row['Title'] . '</td>'; echo '<td>' . $row['Description'] . '</td>'; echo '<td>' . $row['Notes'] . '</td>'; echo '<td>' . $row['SubmitBy'] . '</td>'; echo '<td>' . $row['AssignedEmp'] . '</td>'; echo '<td>' . $row['AssignedGroup'] . '</td>'; echo '<td>' . $row['NameCategory'] . '</td>'; echo '<td>' . $row['TipoStatus'] . '</td>'; echo '<td>' . $row['TiposUrgencia'] . '</td>'; echo '<td>' . $row['CustomerName'] . '</td>'; echo '<td>' . $row['DayCreation'] . '</td>'; echo '</tr>'; } mysqli_free_result($result); echo ''; ?

    Read the article

1