Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

while loop php

<?php
include '../config/config.inc';
$sql = "SELECT TOP(1) * FROM assembly_armatureassy_tbl";
$data = array();
$query = mssql_query($sql);
while($result = mssql_fetch_array($query)){
$data[] = array(
'date' => $result['date'],
'shift' => $result['shift'],
'relay_type' => $result['relay_type'],
'quantity' => $result['quantity'],
'operator_name' => $result['operator_name'],
); 
}
echo json_encode($data);
?>
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #loop #php
ADD COMMENT
Topic
Name
7+5 =