0

Sir I have these codes

<?php
$stockdate="";

$queryx = "SELECT max(data.date)as date
from (
select max(date)as date  from crprp  
union all
select max(date)as date from pouring  
union all
select max(date)as date from product  
) as data";

$resultx = sqlsrv_query($con,$queryx)or die ("Error". sqlsrv_errors($con)) ;  
while ($rowx = sqlsrv_fetch_array ($resultx)){
$stockdate=($rowx['date']);
}
print_r($stockdate);

echo date('l F d, Y', strtotime($stockdate));
?>

The codes displays this result
Untitled2.png

I tested the codes at some place like this
Untitled.png

The result is ok here but what is worng with my above codes?

Please

2
Contributors
1
Reply
23
Views
11 Months
Discussion Span
Last Post by cereal
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.