Folder reorganize 1
This commit is contained in:
53
data/labloads.php
Normal file
53
data/labloads.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
$serverName = "CBM2K12\SQLEXPRESS";
|
||||
$uid = "cbmclient";
|
||||
$pwd = "ascbm2k";
|
||||
$connectionInfo = array( "UID"=>$uid, "PWD"=>$pwd,'ReturnDatesAsStrings'=> true, "CharacterSet" => 'utf-8', "Database"=>"SugarCaneScale" );
|
||||
|
||||
/* Connect using SQL Server Authentication. */
|
||||
$conn = sqlsrv_connect( $serverName, $connectionInfo);
|
||||
if( $conn === false )
|
||||
{
|
||||
echo "Unable to connect.</br>";
|
||||
die( print_r( sqlsrv_errors(), true));
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM LoadData WHERE CropDay = ( SELECT Max(CropDay) FROM LoadData) AND TestNeeded = 1 ORDER by LoadId_Pk DESC";
|
||||
|
||||
$stmt = sqlsrv_query( $conn, $sql );
|
||||
if( $stmt === false) {
|
||||
die( print_r( sqlsrv_errors(), true) );
|
||||
}
|
||||
?>
|
||||
<style type="text/css">
|
||||
|
||||
.tftable1 {font-family:sans-serif;font-size:12px;color:#fbfbfb;width:100%;border-width: 1px;border-color: #686767;border-collapse: collapse;empty-cells: hide;}
|
||||
.tftable1 th {font-family:arial;font-size:20px;background-color:#000000;border-width: 1px;padding: 8px;border-style: solid;border-color: #000000;text-align:left;}
|
||||
.tftable1 tr {background-color:#000000;}
|
||||
.tftable1 td {font-family:sans-serif;font-size:15px;font-weight:bold;border-width: 2px;padding: 3px;border-style: solid;border-color: #686767;}
|
||||
|
||||
</style>
|
||||
<table class="tftable1">
|
||||
<table class="tftable1" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Load Numbers</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<?php
|
||||
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) )
|
||||
{
|
||||
echo "<tr>";
|
||||
echo"<td>".$row['LoadId_Pk']."</td>";
|
||||
echo "</tr>";
|
||||
|
||||
}
|
||||
|
||||
//end
|
||||
|
||||
?>
|
||||
</table>
|
||||
<?
|
||||
$db = null;
|
||||
?>
|
||||
Reference in New Issue
Block a user