473,320 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

PHP ADODB and NLS_DATE unexpected result


Hello,
Here i am having sample program to display selected data on the browser
with Pager functionality of ADODB_Pager.

If i include the NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS';
then the Date column field itself disappear from the display.
if I comment it default date will be displayed.
If i remove the ":" from the Seperator(Timestamp) and put the "." it
will work
i.e
NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS'; // NG

$db->NLS_DATE_FORMAT = 'YYYY-MM-DD HH24.MI.SS'; //OK

My environment
Oracle 10.1.x
PHP 5.0X
Apache 2.x
OCi8
ADODB Latest
Browser IE 6.0

can any one have the clue,

Thanks in Advance

--Here is the working code

<?php

require_once("adodb/adodb.inc.php");
require_once("adodb/adodb-pager.inc.php");
session_start();
$db=NewADOConnection("oci8");
// If i comment the below line works fine with default oracle date
$db->NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS';
$db->Connect("slogdb","logdb","logdb");
//tried this also but bo
//$db->Execute("ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD
HH24:MI:SS'");
$sql="select ACCODE,DATEANDTIME,PATHANDFILE from logdatatbl ";
$pager=new ADODB_Pager($db,$sql);
$pager->Render($rows_per_page=6);
?>

Sep 22 '05 #1
0 2157

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: sky2070 | last post by:
Parse error: parse error, unexpected T_OBJECT_OPERATOR, expecting ')' in c:\inetpub\wwwroot\session.php on line 19 can anyone tell me what is wrong with this code??? <? // Define the Session...
2
by: Salim | last post by:
Hi people, keep getting this errorParse error: parse error, unexpected T_STRING in order_fns.php line 91. the code is below for the file and I've indicated line 91 <?php function...
3
by: Harry Hudini | last post by:
Hi, I have an asp page that needs to display the string that is returned from a cgi file. As an example, if you enter http://mydomain.com/mycgi.cgi?98127398 in to a browser, it will display...
0
by: Robert Mazur | last post by:
MySQL 5.0 alpha (binary install) on Solaris 9 -or- RedHat 8.0 mysql-connector-java-3.0.8-stable ----------------------- Is there something different going on with JDBC and the alpha version...
1
by: dcrespo | last post by:
Hi to all, I have functions defined in an xml-rpc server. Some functions query to a Postgres database (using adodb) and return its recordset. So, if some xml-rpc client runs the mentioned...
62
by: ashu | last post by:
hi look at this code include <stdio.h> int main(void) { int i,j=2; i=j++ * ++j * j++; printf("%d %d",i,j); return 0;
1
by: Slim | last post by:
What are the pros and cons of using ADODB in ASP.NET v System.Data namespace? I not refereeing to supplying data to controls but for manipulating with code. I prefer to use ADODB, but is ...
2
by: b00x | last post by:
I know this doesn't -exactly- match php, but its still related, and adodb doesn't have its own google group yet, so i thought I'd go generic. The problem is, I created a nice little script for...
4
by: Fresh_Air_Rider | last post by:
Hi In the "good old" Classic ASP days, I used to stream records from a SQL Server database out to the user's browser in CSV format by using a combination of COALESCE and the ADODB.Stream object....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.