Re: [PHP-DB] How do I assign Oracle pakage variable's value to aphp variable?

2002-04-30 Thread Paul Edmondson

What a good question.

I've just had a quick look around the API and I think the only way would
be to write a stored function to return the value. 

I could not find any functions to bind to those types of values without
the stored functions.

Have you had any other ideas on how to achieve this? Or even found the
solution? 

On Mon, 2002-04-29 at 20:59, Prince wrote:
 Hello,
 
 I have a package like the following one.
 
 creare or replace package my_pkg as
 my_pkg_var varchar(10) defalut 'myVal';
 end my_pkg ;
 
 Now, I want to read this value into a php variable (say $my_php_var). How do
 I do this?
 
 in PL/SQL, I can easily do this as
 declare
 tmp varchar2(10);
 begin
 tmp := my_pkg.my_pkg_var ;
 end ;
 /
 
 Thanks,
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
-- 

Paul Edmondson, Software Engineer
Yospace: Creating Value for Wireless
7 The Courtyard, High Street, Staines, UK, TW18 4DR
Tel: +44 1784 466388
Fax: +44 1784 466387
http://www.yospace.com



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




Re: [PHP-DB] PHP and OCI NLS behaviour

2002-04-18 Thread Paul Edmondson

On Wed, 2002-04-17 at 22:54, Miguel Carvalho wrote:
 
  Or if that is not available for you to edit you could always try just
  executing a statement to alter the session once a database connection
  is established. This method is a little slower.
 
 How slower? Very very slower? Can you give me an aproximation in seconds?

The speed decrease is dependant on your setup. How fast your machines
are and how good your network is. I ran a few quick tests on our servers
and there seemed to be little effect on performance. The loss of
performance was unmeasurable.

 
 As you will have to
  execute the alter session statements every time you make the
  connection.
 
 Ok.
 
 
  The SQL is something like:
  alter session set NLS_LANGUAGE = 'AMERICAN' NLS_TERRITORY = 'AMERICA'
 
 Can i specify the characterset on the alter session?
 Sorry for the question...but the Oracle docs that i have read, just say
 what is the sintaxe.
 
 Regards
 Miguel Carvalho
 

I'm not sure on the character set setting. You can see your current NLS
settings for your session, instance and database by querying
NLS_SESSION_PARAMETERS, NLS_INSTANCE_PARAMETERS and
NLS_DATABASE_PARAMETERS. Maybe that well help you.


-- 

Paul Edmondson, Software Engineer
Yospace: Creating Value for Wireless
7 The Courtyard, High Street, Staines, UK, TW18 4DR
Tel: +44 1784 466388
Fax: +44 1784 466387
http://www.yospace.com



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




Re: [PHP-DB] Any idea what's wrog with this query?

2002-04-18 Thread Paul Edmondson


see http://www.mysql.com/doc/R/e/Reserved_words.html

Your column called 'when' is a reserved word.
Thats my first guess at your problem. I've come across this before with
MySQL accepting column names that are reserved words. Try changing the
column name to something else and try again.


On Thu, 2002-04-18 at 18:34, Leif K-Brooks wrote:
 I have a field in one of my tables called when, which is type timestamp.
 I'm trying to use some of the date functions to get data from it, but it's
 not working.  The return from mysql_error() is not helpful.  Any ideas?
 Here's my query:
 $query = mysql_query(select month(when) as month,year(when) as
 year,dayofmonth(when) as day,hour(when) as hour,minute(when) as
 minute,second(when) as second from table) or print Error: .mysql_error(); 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
-- 

Paul Edmondson, Software Engineer
Yospace: Creating Value for Wireless
7 The Courtyard, High Street, Staines, UK, TW18 4DR
Tel: +44 1784 466388
Fax: +44 1784 466387
http://www.yospace.com




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




Re: [PHP-DB] Oracel 9i connection problems.

2002-04-16 Thread Paul Edmondson


OK just tested against Apache-1.3.23 with the same result apache seg
faults.

Apache configured as before. PHP configured as before except with
--with-apxs=

Extra information:

ldd /usr/local/apache-1.3.23/bin/httpd 
libpthread.so.0 = /lib/libpthread.so.0 (0x40016000)
libm.so.6 = /lib/libm.so.6 (0x4002c000)
libcrypt.so.1 = /lib/libcrypt.so.1 (0x4004e000)
libexpat.so.0 = /usr/lib/libexpat.so.0 (0x4009)
libdl.so.2 = /lib/libdl.so.2 (0x400b2000)
libc.so.6 = /lib/libc.so.6 (0x400b6000)
/lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x4000)


On Tue, 2002-04-16 at 16:49, Thies C. Arntzen wrote:
 On Tue, Apr 16, 2002 at 04:48:19PM +0100, Paul Edmondson wrote:
  Hello there,
  
  I have a problem with getting php-4.2.0 RC4 connecting to an Oracle 9i
  (9.0.1) database running locally. 
  
  I am running Apache 2.0.35 on SuSE 7.3.
 
 does it work with apache 1.3.x?
  
  The problem that I have is when trying to initiate a connection to the
  database apache seg faults.
  
  An example of the code that causes the segmentation fault:
  
  ?php
  echo Trying to connect;
  $conn =   ocilogon(scott, tiger, );
  echo Connected; // this is never reached
  ?
  
  Other things that may help track down the problem.
  
  Apache has been configured with:
  ./configure --prefix=/usr/local/httpd-2.0.35 --enable-module=so
  
  PHP configured with:
  ./configure --with-oci8 --with-apxs2=/usr/local/httpd-2.0.35
  
  Also tried with:
  ./configure --with-oci8 --with-apxs2=/usr/local/httpd-2.0.35 \
  --enable-sigchild
  
  ${ORACLE_HOME}/lib appears in ld.so.conf
  
  Thanks in advance for any help.
  
  
  
  -- 
  
  Paul Edmondson, Software Engineer
  Yospace: Creating Value for Wireless
  7 The Courtyard, High Street, Staines, UK, TW18 4DR
  Tel: +44 1784 466388
  Fax: +44 1784 466387
  http://www.yospace.com
  
  
  
  
  
  -- 
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
-- 

Paul Edmondson, Software Engineer
Yospace: Creating Value for Wireless
7 The Courtyard, High Street, Staines, UK, TW18 4DR
Tel: +44 1784 466388
Fax: +44 1784 466387
http://www.yospace.com

This email and any files transmitted with it are confidential and
intended
solely for the use of the individual or entity to whom they are
addressed.
Any unauthorised dissemination or copying of this email or its
attachments,
and any use or disclosure of any information contained in them, is
strictly
prohibited and may be illegal. If you have received the email in error
please notify [EMAIL PROTECTED] and delete it from your system.



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