display values from to_char() function.
| From: | hridyesh pant | Date: | Fri, 19 Sep 2008 09:22:43 +0000 |
| Subject: | display values from to_char() function. | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-45435@lists.php.net to get a copy of this message | ||
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/1440),'mm/dd/yy-hh24:mi')
in my select statement.
How do i print the values which are coming to_char() function.
Thanks
hp