RE: display values from to_char() function.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Try

to_char(task_start-(+480/1440),'mm/dd/yy-hh24:mi') as
task_start),to_char(task_end-(+480/1440),'mm/dd/yy-hh24:mi')  as task_end
,task_owner,label_phase,to_char(task_actual_start-(+480/1440),'mm/dd/yy-hh24
:mi') as task_actual_start


Jack



-----Original Message-----
From: hridyesh pant [mailto:hridyesh.pant@xxxxxxxxx] 
Sent: Friday, September 19, 2008 7:23 PM
To: php-db@xxxxxxxxxxxxx
Subject:  display values from to_char() function.

Hi Guys,
i am facing one issue while displaying data.
my sql query is
>>
$res = oci_parse($db,"select
label_name,task_name,task_runnum,task_result,task_machine,task_view,to_char(
task_start-(+480/1440),'mm/dd/yy-hh24:mi'),to_char(task_end-(+480/1440),'mm/
dd/yy-hh24:mi'),task_owner,label_phase,to_char(task_actual_start-(+480/1440)
,'mm/dd/yy-hh24:mi')
from intg_label_hist where label_name ='".$q."' order by task_start DESC");

if (!$res) {
                                    echo("<P>Error performing query: " .
                                    mysql_error() . "</P>");
                                    exit();
                          }
 oci_execute($res);

while ( $row = oci_fetch_array($res) )
{
      echo"<TD><font color=\"#336699\"><b>*$row[TASK_START]*</TD>";
      echo"<TD><font color=\"#336699\"><b>*$row[TASK_END]*</TD>";
      echo"<TD><font color=\"#336699\"><b>$row[LABEL_NAME]</TD>";
      echo"<TD><font color=\"#336699\"><b>$row[TASK_NAME]</TD>";
}

but i am not able to get any value of* $row[TASK_END]* and *$row[TASK_START]
but *rest of the value os coming fine.So i suspect in my select statement
because these two value are like
to_char(task_start-(+480/1440),'mm/dd/yy-hh24:mi'),to_char(task_end-(+480/14
40),'mm/dd/yy-hh24:mi')
in my select statement.
How do i print the values which are coming to_char() function.

Thanks
hp


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux