We are trying to get the following script to display the full date and time. The field we are calling does have both date and time in. Unfortunatly its only returning the date.
So I tried putting the sql "to_date('Adate ','dd/mm/yyyy hh24:mi')" to disply the full field. No Luck
Any help is much appresiated. Thanks.[php]<HTML>
<HEAD><TITLE> Property Results </TITLE>
</HEAD>
<BODY>
<?php
$sql="Select * from Appointment where Appointment_id = ".$_GET["Appointment_id "];
putenv("TNS_ADM IN=/u1/oracle/Products/shu10g/network/admin");
$conn = OCILogon("Usern ame","Password" ,"shu10g");
$stmt = ociparse($conn, $sql);
ociexecute($stm t);
ocifetchinto($s tmt,$row);
ocifreestatemen t($stmt);
ocilogoff($conn );
?>
<form name="form1"met hod="post" action="appoint menthandler.php ">
<input name="Appointme nt_id" type=hiddenid=" Appointment_id" value='<?php print $row[0];?>'>
<table width="75%" border="1">
<tr>
<td><strong>App ointment ID</strong></td>
<td><?php print $row[0];?></td>
</tr>
<tr>
<td><strong><st rong>Staff ID
</stong>
</strong></td>
<td><input name="Staff_id" type="text" id="Staff_id" value='<?php print $row[1];?>'></td>
</tr>
<tr>
<td><strong><st rong>Tenant ID
</string>
</strong></td>
<td><input name="Tenant_id " type="text" id="Tenant_id" value='<?php print $row[2];?>'></td>
</tr>
<tr>
<td><strong>Pro perty ID</strong></td>
<td><input name="Property_ id" type="text" id="Property_id " value='<?php print $row[3];?>'></td>
</tr>
<tr>
<td><strong>Des cription</strong></td>
<td><input name="Descripti on" type="text" id="Description " value='<?php print $row[4];?>'></td>
</tr>
<tr>
<td><strong>App ointment Date</strong></td>
<td><input name="Adate" type="text" id="Adate" value=
'<?php
$sql="Select to_date('Adate' ,'dd/mm/yyyy hh24:mi') from Appointment where Appointment_id = ".$_GET["Appointment_id "];
putenv("TNS_ADM IN=/u1/oracle/Products/shu10g/network/admin");
$conn = OCILogon("Usern ame","Password" ,"shu10g");
$stmt = ociparse($conn, $sql);
ociexecute($stm t);
ocifetchinto($s tmt,$row);
print $row[5];
ocifreestatemen t($stmt);
ocilogoff($conn );
?>'
</td>
</tr>
<tr>
<td><strong>Dur ation (Min)</strong></td>
<td><input name="Duration_ Min" type="text" id="Duration_Mi n" value='<?php print $row[6];?>'></td>
</tr>
</table>
<p>
<input type="submit" name"Submit" value="Submit">
</p>
</form>
</BODY>
</HTML>[/php]
So I tried putting the sql "to_date('Adate ','dd/mm/yyyy hh24:mi')" to disply the full field. No Luck
Any help is much appresiated. Thanks.[php]<HTML>
<HEAD><TITLE> Property Results </TITLE>
</HEAD>
<BODY>
<?php
$sql="Select * from Appointment where Appointment_id = ".$_GET["Appointment_id "];
putenv("TNS_ADM IN=/u1/oracle/Products/shu10g/network/admin");
$conn = OCILogon("Usern ame","Password" ,"shu10g");
$stmt = ociparse($conn, $sql);
ociexecute($stm t);
ocifetchinto($s tmt,$row);
ocifreestatemen t($stmt);
ocilogoff($conn );
?>
<form name="form1"met hod="post" action="appoint menthandler.php ">
<input name="Appointme nt_id" type=hiddenid=" Appointment_id" value='<?php print $row[0];?>'>
<table width="75%" border="1">
<tr>
<td><strong>App ointment ID</strong></td>
<td><?php print $row[0];?></td>
</tr>
<tr>
<td><strong><st rong>Staff ID
</stong>
</strong></td>
<td><input name="Staff_id" type="text" id="Staff_id" value='<?php print $row[1];?>'></td>
</tr>
<tr>
<td><strong><st rong>Tenant ID
</string>
</strong></td>
<td><input name="Tenant_id " type="text" id="Tenant_id" value='<?php print $row[2];?>'></td>
</tr>
<tr>
<td><strong>Pro perty ID</strong></td>
<td><input name="Property_ id" type="text" id="Property_id " value='<?php print $row[3];?>'></td>
</tr>
<tr>
<td><strong>Des cription</strong></td>
<td><input name="Descripti on" type="text" id="Description " value='<?php print $row[4];?>'></td>
</tr>
<tr>
<td><strong>App ointment Date</strong></td>
<td><input name="Adate" type="text" id="Adate" value=
'<?php
$sql="Select to_date('Adate' ,'dd/mm/yyyy hh24:mi') from Appointment where Appointment_id = ".$_GET["Appointment_id "];
putenv("TNS_ADM IN=/u1/oracle/Products/shu10g/network/admin");
$conn = OCILogon("Usern ame","Password" ,"shu10g");
$stmt = ociparse($conn, $sql);
ociexecute($stm t);
ocifetchinto($s tmt,$row);
print $row[5];
ocifreestatemen t($stmt);
ocilogoff($conn );
?>'
</td>
</tr>
<tr>
<td><strong>Dur ation (Min)</strong></td>
<td><input name="Duration_ Min" type="text" id="Duration_Mi n" value='<?php print $row[6];?>'></td>
</tr>
</table>
<p>
<input type="submit" name"Submit" value="Submit">
</p>
</form>
</BODY>
</HTML>[/php]
Comment