daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest May 16th, 2018 104 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Make the paginated query;
  2.     $query = "SELECT t.trxid, t.trxdate, t.empid, t.custid, d.trxid, d.methodID, d.dvdid, d.price, e1.id, e1.first_name, e1.last_name,
  3.     e2.id, e2.first_name, e2.last_name, p.methodID, p.paytype, m.dvdid, m.title FROM trx as t
  4.     LEFT JOIN trxdetails as d ON t.trxid = d.trxid
  5.     LEFT JOIN paymethod as p ON d.methodID = p.methodID
  6.     LEFT JOIN dvd as m ON d.dvdid = m.dvdid
  7.     INNER JOIN everyone as e1 ON t.empid = e1.id
  8.     INNER JOIN everyone as e2 ON t.custid = e2.id
  9.     ORDER BY trxdate DESC LIMIT $start, $display";
  10.     $result = @mysqli_query ($dbc, $query);
  11.  
  12.     //Table:
  13.     echo '<table align="center" width="750px" cellspacing="0" border=".5px" ! important><tr>
  14.     <th>Trx #</th><th>Trx Date/Time</th><th>Employee</th><th>Customer</th><th>Movie Title</th><th>Price</th><th>Payment Method</th></tr>';
  15.     //Fetch and display all the records...
  16.     while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
  17.  
  18.     echo '<td align="left" width="5%" height="25px">'.$row['trxid'].'</td>
  19.         <td align="right" width="10%">'.$row['trxdate'].'</td>
  20.         <td align="left" width="10%">'.$row['first_name'].' '.$row['last_name'].'</td>
  21.         <td align="left" width="10%">'.$row['first_name'].' '.$row['last_name'].'</td>
  22.         <td align="left" width="10%">'.$row['title'].'</td>
  23.         <td align="left" width="5%">'.$row['price'].'</td>
  24.         <td align="left" width="5%">'.$row['paytype'].'</a></td>
  25.         <td align="center" width="5%"><a href=../trx/updateform.php?trxid='.$row['trxid'].'><em>Update</em></a></td>
  26.         <td align="center" width="5%"><a href=../trx/deleteconfirm.php?trxid='.$row['trxid'].'><em>Delete</em></a></td>
  27.     </tr>
  28.  
  29.     ';
  30. } // End of While statement
  31.     echo "</table>";        
  32.     mysqli_close($dbc); // Close the database connection.
  33.    
  34. $data ['e1'] = array(
  35.         "id"=>$row['e1_id'],
  36.         "first_name"=>$row['e1_first_name'],
  37.         "last_name"=>$row['e1_last_name'],
  38.     );
  39.  
  40. <td align="left" width="5%">'.$row['e1'].' '.$row['$e1'].'</td>
  41. <td align="left" width="5%">'.$row['first_name'].' '.$row['last_name'].'</td>
  42.    
  43. $data ['e1'] = array(
  44.         "e1id"=>$row['1'],
  45.         "e1fname"=>$row['e1'],
  46.         "e1lname"=>$row['e1'],
  47.     ),
  48.     $data ['e2'] => array(
  49.         "e2id"=>$row['e2'],
  50.         "e2fname"=>$row['e2'],
  51.         "e2lname"=>$row['e2'],
  52.     ),
  53.  
  54. <td align="left" width="5%">'.$row['e1fname'].' '.$row['$e1lname'].'</td>
  55. <td align="left" width="5%">'.$row['first_name'].' '.$row['last_name'].'</td>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top