Click here to Skip to main content
15,881,248 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: My First Web API Pin
Kevin Marois20-Jun-18 10:59
professionalKevin Marois20-Jun-18 10:59 
GeneralRe: My First Web API Pin
Richard Deeming21-Jun-18 12:19
mveRichard Deeming21-Jun-18 12:19 
QuestionPassing jqGrid Data To Server-Side Method Pin
MadDashCoder16-Jun-18 1:54
MadDashCoder16-Jun-18 1:54 
QuestionHow you do make user list Pin
tijon113-Jun-18 5:38
tijon113-Jun-18 5:38 
AnswerRe: How you do make user list Pin
David Mujica14-Jun-18 3:03
David Mujica14-Jun-18 3:03 
Questionwhere to post CSS questions? Pin
piano001113-Jun-18 0:38
piano001113-Jun-18 0:38 
AnswerRe: where to post CSS questions? Pin
tijon113-Jun-18 5:41
tijon113-Jun-18 5:41 
QuestionGet more than 1 data entry from DB using PHP Pin
Member 1386791311-Jun-18 4:01
Member 1386791311-Jun-18 4:01 
Hi all,

I am trying to get multiple rows data which has same id. So the same id can be allocated to different entries and I need to display this.

The code as follows:
<pre><?php require_once('Connections/eam.php'); ?>
<?php 
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$colname_rsMaintenanceAsset = "-1";

if (isset($_GET['recordID'])) {
  $colname_rsMaintenanceAsset = $_GET['recordID'];
}
mysql_select_db($database_eam, $eam);
$query_rsMaintenanceAsset = sprintf("SELECT * FROM maintenance_history WHERE maint_id = %s", GetSQLValueString($colname_rsMaintenanceAsset, "int"));
$rsMaintenanceAsset = mysql_query($query_rsMaintenanceAsset, $eam) or die(mysql_error());
$row_rsMaintenanceAsset = mysql_fetch_assoc($rsMaintenanceAsset);
$totalRows_rsMaintenanceAsset = mysql_num_rows($rsMaintenanceAsset);
}

 
$pageTitle="Maintenance History"; ?>



<?php include('includes/header.php'); ?>
    <h3>Maintenance history for  Asset ID: <?php echo $colname_rsMaintenanceAsset; ?></h3>
    <table class="table1">
      <tr>
        <th>Maintenance ID</th>
        <th>Date Completed</th>
        <th>By</th>
        <th>Checklist</th>
        <th>Comments</th>
        <th>SPARE</th>
        <th>View   </th>
      </tr>
      <?php do { ?>
        <tr onmouseover="this.bgColor='#F2F7FF'" onmouseout="this.bgColor='#FFFFFF'";>
          <td> <?php echo $row_rsMaintenanceAsset['id']; ?>  </td>
          <td> <?php echo $row_rsMaintenanceAsset['date_completed']; ?>  </td>
          <td> <?php echo $row_rsMaintenanceAsset['by_staff']; ?>  </td>
          <td> <?php echo $row_rsMaintenanceAsset['maint_checklist']; ?>  </td>
          <td> <?php echo $row_rsMaintenanceAsset['maint_comm']; ?>  </td>
          <td> <?php echo $row_rsMaintenanceAsset['status']; ?>  </td>


          <td> <a href="HardwareDetail.php?recordID=<?php echo $row_rsMaintenanceAssets['maint_id']; ?>">View</a></td>
 
        </tr>
      <?php } while ($row_rsMaintenanceAssets = mysql_fetch_assoc($rsMaintenanceAssets)); ?>
    </table>


Any help appreciated Thumbs Up | :thumbsup: Thumbs Up | :thumbsup: Thumbs Up | :thumbsup:
AnswerRe: Get more than 1 data entry from DB using PHP Pin
Jochen Arndt11-Jun-18 22:55
professionalJochen Arndt11-Jun-18 22:55 
GeneralRe: Get more than 1 data entry from DB using PHP Pin
Member 1386791312-Jun-18 2:34
Member 1386791312-Jun-18 2:34 
QuestionSignalR - resources Pin
User 110609799-Jun-18 9:15
User 110609799-Jun-18 9:15 
QuestionMagento 2: config url rewrite? Pin
Vicent Nguyen7-Jun-18 18:06
professionalVicent Nguyen7-Jun-18 18:06 
Questionhow to merge two powerpoint presentation slides into one ppt using php or javascript ? Pin
Member 1385293031-May-18 2:22
Member 1385293031-May-18 2:22 
QuestionMVC - Video chat with my screen sharing web Pin
Gunasekararan30-May-18 1:24
professionalGunasekararan30-May-18 1:24 
QuestionIs this code correct? Pin
X2A coding25-May-18 4:28
professionalX2A coding25-May-18 4:28 
QuestionRe: Is this code correct? Pin
Richard MacCutchan25-May-18 4:35
mveRichard MacCutchan25-May-18 4:35 
Questionpython webdevelopment Pin
Member 1384376324-May-18 21:49
Member 1384376324-May-18 21:49 
AnswerRe: python webdevelopment Pin
Nathan Minier25-May-18 1:25
professionalNathan Minier25-May-18 1:25 
QuestionInformation about wordpress Pin
Max Power Marketing, LLC10-May-18 21:51
Max Power Marketing, LLC10-May-18 21:51 
AnswerRe: Information about wordpress Pin
Richard MacCutchan11-May-18 3:12
mveRichard MacCutchan11-May-18 3:12 
AnswerRe: Information about wordpress Pin
wyzrahman14-May-18 10:49
wyzrahman14-May-18 10:49 
QuestionHow Do I Design This Simple (yet Responsive) Site...??? Pin
Member 1208020110-May-18 12:43
Member 1208020110-May-18 12:43 
AnswerRe: How Do I Design This Simple (yet Responsive) Site...??? Pin
Richard Deeming11-May-18 1:37
mveRichard Deeming11-May-18 1:37 
AnswerRe: How Do I Design This Simple (yet Responsive) Site...??? Pin
jkirkerx27-May-18 19:13
professionaljkirkerx27-May-18 19:13 
QuestionFixing a Broken Interceptor Pin
cjb1108-May-18 3:50
cjb1108-May-18 3:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.