display values from to_char() function.
am 19.09.2008 11:22:43 von Hridyesh Pant
------=_Part_1543_19831595.1221816163821
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
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,ta sk_view,to_char(task_start-(+480/1440),'mm/dd/yy-hh24:mi'),t o_char(task_end-(+480/1440),'mm/dd/yy-hh24:mi'),task_owner,l abel_phase,to_char(task_actual_start-(+480/1440),'mm/dd/yy-h h24:mi')
from intg_label_hist where label_name ='".$q."' order by task_start DESC");
if (!$res) {
echo("
Error performing query: " .
mysql_error() . "
");
exit();
}
oci_execute($res);
while ( $row = oci_fetch_array($res) )
{
echo"*$row[TASK_START]* | ";
echo"*$row[TASK_END]* | ";
echo"$row[LABEL_NAME] | ";
echo"$row[TASK_NAME] | ";
}
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(t ask_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
------=_Part_1543_19831595.1221816163821--
RE: display values from to_char() function.
am 20.09.2008 06:52:24 von Jack van Zanen
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@gmail.com]
Sent: Friday, September 19, 2008 7:23 PM
To: php-db@lists.php.net
Subject: [PHP-DB] 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,ta sk_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_s tart-(+480/1440)
,'mm/dd/yy-hh24:mi')
from intg_label_hist where label_name ='".$q."' order by task_start DESC");
if (!$res) {
echo("
Error performing query: " .
mysql_error() . "
");
exit();
}
oci_execute($res);
while ( $row = oci_fetch_array($res) )
{
echo"*$row[TASK_START]* | ";
echo"*$row[TASK_END]* | ";
echo"$row[LABEL_NAME] | ";
echo"$row[TASK_NAME] | ";
}
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(t ask_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