Re: [PHP-DB] problem with copy()

2003-01-28 Thread Andrey Hristov
 AFAIK none is put into tmp_file when the file upload wasn't successful.

Andrey

- Original Message -
From: Bartosz Matosiuk [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 28, 2003 2:07 PM
Subject: [PHP-DB] problem with copy()


 hi

 can the string source in copy () looks like that: c:\pic.jpg. If not
 than how should it look like.

 I'm not sure becouse script gives me Unable to open c:\pic.jpg for
 reading: No such file or directory but the file is there.

 and when i'm using $HTTP_POST_FILES['file']['tmp_name'] it returns me:
 'Unable to open 'none' for reading: No such file or directory'.





 --
 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




Re: [PHP-DB] foreach($HTTP_POST_VARS as $key = $value)

2003-01-22 Thread Andrey Hristov
 Long time ago I built a class for these needs. In fact the half of the code
is *stolen* from implemenation of my colleague. I just made it OOP.

 The class in pi-validate.class.php.txt, the definitions of the checked
fields is in pi-validate.defs.php

Sample use :
  $validate_result = CValidate::validate_validate_data(VALIDATE_NEW_USER,
$user_data);
  if ($validate_result[0] != GENERAL_OPERATION_SUCCESSFUL){
   return array(VALIDATE_FAIL, VALIDATE_FAIL_MESSAGE, $validate_result[2]);
  }/* if */

It is kindly complicated example but hope you get it. For every new page
just define the variables you expect to come and rules for them and nothing
more is needed except to place a code like that above to check the validity.
In case of error $validate_result will contain information for the error.


Regards,
Andrey


- Original Message -
From: Addison Ellis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 22, 2003 9:24 AM
Subject: [PHP-DB] foreach($HTTP_POST_VARS as $key = $value)


 hello,
 i do appreciate your time...
 below the code following i don't know where to go. do i need
 to list each value individually or can i do something with
 $HTTP_POST_VARS  or am i even headed in the right direction? i am
 trying to point all my forms to this .php file to check for errors,
 and if they are ok, insert the submitted form values into a table in
 a database. thank you. addison ellis
 foreach($HTTP_POST_VARS as $key = $value)
{
  if ($key != )
  {
if ($value == )
{
  $message_new = font face=verdana size=1
 color=redRequired information missing.\n
  Please try again./font;
}
  }
  if (ereg({name),$key))
  {
   if (!ereg(^[A-Za-z' -]{1,50}$,$key))
   {
 $message_new = font face=verdana size=1 color=redSome
 information not processing.\n
  Please try again./font;
   }
  }
  $$key = strip_tags(trim($value));
}
if (!ereg(^[0-9)(xX -]{7,20}$,$phone))
{
  $message_new = font face=verdana size=1 color=redNot a
 valid phone number.\n
  Please try again./font;
}
if (!ereg(^.+@.+\\..+$,$email))
{
  $message_new = font face=verdana size=1 color=redNot a
 valid email address.\n
   Please try again./font;
 }
else
 if ($message == )
 {
 $query = insert into ad_columns  set
 --
 Addison Ellis
 small independent publishing co.
 114 B 29th Avenue North
 Nashville, TN 37203
 (615) 321-1791
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 subsidiaries of small independent publishing co.
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]

?php
/**
Definition file - defintions of various data.

This module is part from PHPIntra system and is licensed under GPL.

@author Andrey Hristov [EMAIL PROTECTED]
@version$Id: pi-validate.defs.php,v 1.3 2002/07/09 07:30:22 nobody Exp $
@packagePHPIntra
@module pi_validate_defs
*/

/**
@const  VALIDATE_NEW_RULE   .
*/
define('VALIDATE_NEW_RULE', 'new_rule_defs');

/**
@const  VALIDATE_UPDATE_RULE.
*/
define('VALIDATE_UPDATE_RULE', 'update_rule_defs');

/**
@const  VALIDATE_NEW_USER   .
*/
define('VALIDATE_NEW_USER', 'new_user_defs');

/**
@const  VALIDATE_CHANGE_USER_DATA   .
*/
define('VALIDATE_CHANGE_USER_DATA', 'change_user_defs');

/**
@const  VALIDATE_CREATE_TASK_DATA   .
*/
define('VALIDATE_CREATE_TASK_DATA', 'create_task');

/**
@const  VALIDATE_UPDATE_TASK_DATA   .
*/
define('VALIDATE_UPDATE_TASK_DATA', 'update_task');

/**
@const  VALIDATE_CREATE_WSESSION_DATA   .
*/
define('VALIDATE_CREATE_WSESSION_DATA', 'create_wsession');

/*
T - Text
H - Hidden
P - Password
A - text Area
F - File upload
L - List (select)
M - Multiple Selection
C - Checkbox
*/
define('VALIDATE_TYPE_INT',1);
define('VALIDATE_TYPE_FLOAT',2);
define('VALIDATE_TYPE_ARRAY',3);
define('VALIDATE_TYPE_STRING',4);

define('VALIDATE_SELECT_NONE','none');

$VALIDATE_DEFINITIONS = array(
VALIDATE_UPDATE_RULE = array(
'old_schedule_id'   = array(
'type'  = 'T',
'pattern'   = '/^\d+$/',
'optional'  = 0,
'maxlen'= 10,
'allowtags' = 0,
'lang_type' = VALIDATE_TYPE_INT,
),
'old_start_time'= array(
'type'  = 'T',
'pattern'   = 
'/^(?:(?:(?:0|1|)[\d]{1})|(?:2[0-3]{1}))(?:\:[\d]{0,2}){0,2}$/',
'optional'  = 0,
'maxlen'= 8,
'allowtags' = 0,
'lang_type' = VALIDATE_TYPE_STRING,
),
'schedule_id

Re: [PHP-DB] blob

2003-01-07 Thread Andrey Hristov
 Keep in mind that BLOB is up to 64k thus you may need larger BLOB.
Look at the mysql's documenations for more information
http://www.mysql.com/doc/en/

Andrey

P.S.
Have a nice night.

- Original Message -
From: Natividad Castro [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 07, 2003 10:17 PM
Subject: [PHP-DB] blob


 Hi to all,
 I want to be able to load PDFs into mysql DB, but I'm not very familiar
with
 the blob data type?
 Can someone point me on the right direction how to do this?

 Thanks in advance
 Nato


 --
 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




Re: [PHP-DB] Help about printing an integer variable

2003-01-06 Thread Andrey Hristov
something like

printf(%+4d, $int_var);

Andrey

- Original Message -
From: Martín Agüero [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 06, 2003 4:52 PM
Subject: [PHP-DB] Help about printing an integer variable


I need to print an integer varible using this format '', I mean it
always have to show four digits.  How can I do that?

Thanks,

Martin.



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




Re: [PHP-DB] Special characters

2003-01-06 Thread Andrey Hristov
  Fernando,
 try to store you data in unicode (utf8) for example.
You iconv to transform if it is needed.

Andrey

- Original Message -
From: Bernain, Fernando G. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 06, 2003 7:25 PM
Subject: [PHP-DB] Special characters


 I'm working with MSSQL7.0 Apache 1.3.19 and PHP4.2.3
 When I select a table with this kind of characters: ó The output is
¢...

 I have the same problem with the others vocals (á-é-í-ú)

 What can I do??? Forgot the spanish???

 Fernando Bernain
 Senior A
 Business Process Outsourcing

 KPMG Argentina
 Tel: 54 11 4316 5754
 Fax: 54 11 4316 5734
 [EMAIL PROTECTED]





 Email Disclaimer

 The information in this email is confidential and may be
 legally privileged.
 It is intended solely for the addressee.
 Access to this email by anyone else is unauthorised.
 If you are not the intended recipient, any disclosure,
 copying, distribution
 or any action taken or omitted to be taken in reliance
 on it, is prohibited and may be unlawful.
 When addressed to our clients any opinions or advice
 contained in this email are subject to the terms and
 conditions expressed in the governing KPMG client engagement
 letter.


 --
 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




Re: [PHP-DB] Special characters

2003-01-06 Thread Andrey Hristov
 Fernando,
I don't mean you to change the set of your db.
I use mysql, it has char(), and I store utf-8 encoded strings. Every utf8
encoded string is made of bytes and every byte can be entered. I don't want
to tell that this will work in your case but it won't hurt. iconv extension
is good to transform you iso-8859-1 strings to utf8. after retrieving from
db just converted them fron unicode.

Regards,
Andrey

- Original Message -
From: Bernain, Fernando G. [EMAIL PROTECTED]
To: 'Andrey Hristov' [EMAIL PROTECTED]; Bernain, Fernando G.
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, January 06, 2003 7:31 PM
Subject: RE: [PHP-DB] Special characters


 I can't modify the character set of my MSSQL...
 (Character Set = 1, iso_1 ISO 8859-1 (Latin-1) - Western European 8-bit
 character set.)

 And I NEDD the á-é-í-ó-ú-ñ

 Any idea?

 Fernando Bernain
 Senior A
 Business Process Outsourcing

 KPMG Argentina
 Tel: 54 11 4316 5754
 Fax: 54 11 4316 5734
 [EMAIL PROTECTED]




 -Original Message-
 From: Andrey Hristov [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 06, 2003 2:30 PM
 To: Bernain, Fernando G.; [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] Special characters


   Fernando,
  try to store you data in unicode (utf8) for example.
 You iconv to transform if it is needed.

 Andrey

 - Original Message -
 From: Bernain, Fernando G. [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, January 06, 2003 7:25 PM
 Subject: [PHP-DB] Special characters


  I'm working with MSSQL7.0 Apache 1.3.19 and PHP4.2.3
  When I select a table with this kind of characters: ó The output is
 ¢...
 
  I have the same problem with the others vocals (á-é-í-ú)
 
  What can I do??? Forgot the spanish???
 
  Fernando Bernain
  Senior A
  Business Process Outsourcing
 
  KPMG Argentina
  Tel: 54 11 4316 5754
  Fax: 54 11 4316 5734
  [EMAIL PROTECTED]
 
 
 
 
 
  Email Disclaimer
 
  The information in this email is confidential and may be
  legally privileged.
  It is intended solely for the addressee.
  Access to this email by anyone else is unauthorised.
  If you are not the intended recipient, any disclosure,
  copying, distribution
  or any action taken or omitted to be taken in reliance
  on it, is prohibited and may be unlawful.
  When addressed to our clients any opinions or advice
  contained in this email are subject to the terms and
  conditions expressed in the governing KPMG client engagement
  letter.
 
 
  --
  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



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




Re: [PHP-DB] MySQL Database connection Problem

2003-01-03 Thread Andrey Hristov
  Hi,
 Does mysql user has rights to write in this directory or permissions over
this file?

Andrey

- Original Message -
From: conbud [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, January 03, 2003 11:00 AM
Subject: [PHP-DB] MySQL Database connection Problem


 Hello can someone give me some possible reasons this error happens when
 I use the mysql client to add a tabe to a database.

 mysql create table home (id int not null, heading blob not null,
  - primary key (id), unique id (id));
 ERROR 3: Error writing file './nrlug/home.frm' (Errcode: 28)

 Any help would be appreciated

 Lee


 --
 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




Re: [PHP-DB] MySQL Database connection Problem

2003-01-03 Thread Andrey Hristov

http://www.alt-php-faq.org/local/74/

Question :

I am trying to create a database and keep getting an error :- (Errcode: 28)

Answer :

errcode: 28

No space left on device

This means that you are out of disk space.
Try du to see how much space is free/used


Best regards
Andrey Hristov


- Original Message -
From: conbud [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, January 03, 2003 11:11 AM
Subject: Re: [PHP-DB] MySQL Database connection Problem


 Jason Wong wrote:
  On Friday 03 January 2003 17:00, conbud wrote:
 
 Hello can someone give me some possible reasons this error happens when
 I use the mysql client to add a tabe to a database.
 
 mysql create table home (id int not null, heading blob not null,
  - primary key (id), unique id (id));
 ERROR 3: Error writing file './nrlug/home.frm' (Errcode: 28)
 
 
  This is obviously a mysql question. Go to their website and search on
the
  error message.
 

 Jason that seems to be your answer to everything, that and RTFM. Well I
 have already done both and cant seem to find anything on it, so thats
 why I would ask  here. Makes sense huh ?


 --
 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




Re: [PHP-DB] MySQL Database connection Problem

2003-01-03 Thread Andrey Hristov
what about the permissions? are they ok?


Andrey

- Original Message -
From: conbud [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, January 03, 2003 11:30 AM
Subject: Re: [PHP-DB] MySQL Database connection Problem


 Andrey thanks, but I seen that already and theres over 80 gig left on the
 server and about 17 gig of that is still alloted to the database.

 Andrey Hristov [EMAIL PROTECTED] wrote in message
 010c01c2b309$8d8d7210$1601a8c0@andreywin">news:010c01c2b309$8d8d7210$1601a8c0@andreywin...
 
  http://www.alt-php-faq.org/local/74/
 
  Question :
 
  I am trying to create a database and keep getting an error :- (Errcode:
 28)
 
  Answer :
 
  errcode: 28
 
  No space left on device
 
  This means that you are out of disk space.
  Try du to see how much space is free/used
 
 
  Best regards
  Andrey Hristov
 
 
  - Original Message -
  From: conbud [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Sent: Friday, January 03, 2003 11:11 AM
  Subject: Re: [PHP-DB] MySQL Database connection Problem
 
 
   Jason Wong wrote:
On Friday 03 January 2003 17:00, conbud wrote:
   
   Hello can someone give me some possible reasons this error happens
 when
   I use the mysql client to add a tabe to a database.
   
   mysql create table home (id int not null, heading blob not null,
- primary key (id), unique id (id));
   ERROR 3: Error writing file './nrlug/home.frm' (Errcode: 28)
   
   
This is obviously a mysql question. Go to their website and search
on
  the
error message.
   
  
   Jason that seems to be your answer to everything, that and RTFM. Well
I
   have already done both and cant seem to find anything on it, so thats
   why I would ask  here. Makes sense huh ?
  
  
   --
   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



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




Re: [PHP-DB] Oracle/PHP question...

2002-12-17 Thread Andrey Hristov
AFAIK he uses *nix, not windows.
(.so-s are possible sollution but prebuilt ones are not shipped with php).

Andrey


- Original Message -
From: xxx  [EMAIL PROTECTED]
To: Anthony Carlos [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, December 17, 2002 4:32 PM
Subject: Re: [PHP-DB] Oracle/PHP question...


 Hy,
 in php.ini you have to uncomment the
 ;extension=php_oci8.dll
 ;extension=php_oracle.dll

 ; is a comment

 and restart the server
 cybercop78




 On Tue, 17 Dec 2002 08:29:36 -0500, Anthony Carlos wrote
  Yes, you need to recompile PHP:
./configure --with-oci8=[your_oracle_home]
 
  -Original Message-
  From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]]
  Sent: Monday, December 16, 2002 1:58 PM
  To: '[EMAIL PROTECTED]'
  Subject: [PHP-DB] Oracle/PHP question...
 
  I am now trying to setup connectivity to a remote Oracle database
  for my PHP/Apache web server.  I am attempting to verify
  connectivity to the database by:
 
  ?php
  $connection = OCILogon(user, password) or die (Unable to logon
  to database.); ?
 
  I have installed the Oracle client on the system, and I have also
  setup the ORACLE_HOME and ORACLE_SID environment variables.
Unfortunately
  at this point I am not even able to make a successful connection to the
  Oracle database.  I am currently receiving the following error:
 
  Fatal error: Call to undefined function: ocilogon() in
/www/DW/oratest.php
  on line 10
 
  Do I need to recompile PHP to be Oracle aware or something?
  What is it I am missing at this point?  Thanks in advance. Scott
  Nipp Phone:  (214) 858-1289 E-mail:  [EMAIL PROTECTED] Web:
http:\\ldsa.sbcld.sbc.com
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php





 http://www.idilis.ro - Stiri, e-mail gratuit, download,
 SMS, server de counter-strike, hosting gratuit, servicii internet...
 Fii cu un pas inaintea celorlati!


 --
 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




Re: [PHP-DB] Oracle/PHP question...

2002-12-17 Thread Andrey Hristov
 As Anthony Carlos said - compile your php with oracle and oci support.
Then you will have all the functions from the modules. The next thing to do
after the compile (and web server restart). You said that you configured the
SID and the HOME so that's fine. Just compile new binary

Regards,
Andrey

- Original Message -
From: NIPP, SCOTT V (SBCSI) [EMAIL PROTECTED]
To: 'Andrey Hristov' [EMAIL PROTECTED]; xxx  [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, December 17, 2002 4:37 PM
Subject: RE: [PHP-DB] Oracle/PHP question...


 Correct.  I am working on Unix, specifically HP-UX 11.00.

 -Original Message-
 From: Andrey Hristov [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 17, 2002 8:38 AM
 To: xxx ; [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] Oracle/PHP question...


 AFAIK he uses *nix, not windows.
 (.so-s are possible sollution but prebuilt ones are not shipped with php).

 Andrey


 - Original Message -
 From: xxx  [EMAIL PROTECTED]
 To: Anthony Carlos [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Tuesday, December 17, 2002 4:32 PM
 Subject: Re: [PHP-DB] Oracle/PHP question...


  Hy,
  in php.ini you have to uncomment the
  ;extension=php_oci8.dll
  ;extension=php_oracle.dll
 
  ; is a comment
 
  and restart the server
  cybercop78
 
 
 
 
  On Tue, 17 Dec 2002 08:29:36 -0500, Anthony Carlos wrote
   Yes, you need to recompile PHP:
 ./configure --with-oci8=[your_oracle_home]
  
   -Original Message-
   From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]]
   Sent: Monday, December 16, 2002 1:58 PM
   To: '[EMAIL PROTECTED]'
   Subject: [PHP-DB] Oracle/PHP question...
  
   I am now trying to setup connectivity to a remote Oracle database
   for my PHP/Apache web server.  I am attempting to verify
   connectivity to the database by:
  
   ?php
   $connection = OCILogon(user, password) or die (Unable to logon
   to database.); ?
  
   I have installed the Oracle client on the system, and I have also
   setup the ORACLE_HOME and ORACLE_SID environment variables.
 Unfortunately
   at this point I am not even able to make a successful connection to
the
   Oracle database.  I am currently receiving the following error:
  
   Fatal error: Call to undefined function: ocilogon() in
 /www/DW/oratest.php
   on line 10
  
   Do I need to recompile PHP to be Oracle aware or something?
   What is it I am missing at this point?  Thanks in advance. Scott
   Nipp Phone:  (214) 858-1289 E-mail:  [EMAIL PROTECTED] Web:
 http:\\ldsa.sbcld.sbc.com
  
   --
   PHP Database Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
 
  http://www.idilis.ro - Stiri, e-mail gratuit, download,
  SMS, server de counter-strike, hosting gratuit, servicii internet...
  Fii cu un pas inaintea celorlati!
 
 
  --
  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

 --
 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




Re: [PHP-DB] Oracle/PHP question...

2002-12-17 Thread Andrey Hristov
Compile with --with-oci8

Andrey

- Original Message -
From: NIPP, SCOTT V (SBCSI) [EMAIL PROTECTED]
To: 'Andrey Hristov' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, December 17, 2002 4:56 PM
Subject: RE: [PHP-DB] Oracle/PHP question...


 I am running Oracle 8.0.6.3.  Do I need both --with-oracle and
 --with-oci8?  I was under the impression that I only needed the option
 --with-oci8.  Thanks.

 -Original Message-
 From: Andrey Hristov [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 17, 2002 8:46 AM
 To: NIPP, SCOTT V (SBCSI); [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] Oracle/PHP question...


  As Anthony Carlos said - compile your php with oracle and oci support.
 Then you will have all the functions from the modules. The next thing to
do
 after the compile (and web server restart). You said that you configured
the
 SID and the HOME so that's fine. Just compile new binary

 Regards,
 Andrey

 - Original Message -
 From: NIPP, SCOTT V (SBCSI) [EMAIL PROTECTED]
 To: 'Andrey Hristov' [EMAIL PROTECTED]; xxx  [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Tuesday, December 17, 2002 4:37 PM
 Subject: RE: [PHP-DB] Oracle/PHP question...


  Correct.  I am working on Unix, specifically HP-UX 11.00.
 
  -Original Message-
  From: Andrey Hristov [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, December 17, 2002 8:38 AM
  To: xxx ; [EMAIL PROTECTED]
  Subject: Re: [PHP-DB] Oracle/PHP question...
 
 
  AFAIK he uses *nix, not windows.
  (.so-s are possible sollution but prebuilt ones are not shipped with
php).
 
  Andrey
 
 
  - Original Message -
  From: xxx  [EMAIL PROTECTED]
  To: Anthony Carlos [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Sent: Tuesday, December 17, 2002 4:32 PM
  Subject: Re: [PHP-DB] Oracle/PHP question...
 
 
   Hy,
   in php.ini you have to uncomment the
   ;extension=php_oci8.dll
   ;extension=php_oracle.dll
  
   ; is a comment
  
   and restart the server
   cybercop78
  
  
  
  
   On Tue, 17 Dec 2002 08:29:36 -0500, Anthony Carlos wrote
Yes, you need to recompile PHP:
  ./configure --with-oci8=[your_oracle_home]
   
-Original Message-
From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 1:58 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP-DB] Oracle/PHP question...
   
I am now trying to setup connectivity to a remote Oracle
database
for my PHP/Apache web server.  I am attempting to verify
connectivity to the database by:
   
?php
$connection = OCILogon(user, password) or die (Unable to logon
to database.); ?
   
I have installed the Oracle client on the system, and I have
also
setup the ORACLE_HOME and ORACLE_SID environment variables.
  Unfortunately
at this point I am not even able to make a successful connection to
 the
Oracle database.  I am currently receiving the following error:
   
Fatal error: Call to undefined function: ocilogon() in
  /www/DW/oratest.php
on line 10
   
Do I need to recompile PHP to be Oracle aware or something?
What is it I am missing at this point?  Thanks in advance. Scott
Nipp Phone:  (214) 858-1289 E-mail:  [EMAIL PROTECTED] Web:
  http:\\ldsa.sbcld.sbc.com
   
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
  
  
  
  
  
   http://www.idilis.ro - Stiri, e-mail gratuit, download,
   SMS, server de counter-strike, hosting gratuit, servicii internet...
   Fii cu un pas inaintea celorlati!
  
  
   --
   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
 
  --
  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




Re: [PHP-DB] Sessions Vs DB Access

2002-11-25 Thread Andrey Hristov
 Quick hack for those who think that the MM handler is not stable
is to use the standard handler and the directory where the session files
will be to be mounted as tmpfs (even /tmp). This will give almost of the
MM's speed
without worrying whether MM is stable or not.


Andrey

- Original Message -
From: Mika Tuupola [EMAIL PROTECTED]
To: Peter Beckman [EMAIL PROTECTED]
Cc: Dave Smith [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, November 25, 2002 11:30 AM
Subject: Re: [PHP-DB] Sessions Vs DB Access


 On Sun, 24 Nov 2002, Peter Beckman wrote:

  Don't forget that you can use the DB to store PHP Sessions as well,
which
  is faster than storing the sessions in /tmp on the file system.  If you
  have well written SQL, you can have 5-30 queries per page, most of which
  should return the data in under 1/100 of a second.

 Well it depends. On Solaris /tmp/ is tmpfs which is memory
 based filesystem so it will essentially have speed of a
 ram disk.

 --
 Mika Tuupola  http://www.appelsiini.net/~tuupola/


 --
 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




Re: [PHP-DB] Millions of records in MySQL

2002-10-25 Thread Andrey Hristov
Go to www.mysql.com and join their's general list. it's address is
[EMAIL PROTECTED]


Andrey

- Original Message -
From: Steve Vernon [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 25, 2002 2:15 PM
Subject: Re: [PHP-DB] Millions of records in MySQL


 Which is the MySQL list you are talking about please?

 Thanks,

 Steve

  On Friday 25 October 2002 16:10, Steve Vernon wrote:
   Hiya,
   I remember ages ago that mysql does not properly handle upwards of
 10
   million records in a table?
  
   Any details would be great!
 
  Try it, or ask on the mysql list?
 
  --
  Jason Wong - Gremlins Associates - www.gremlins.com.hk
  Open Source Software Systems Integrators
  * Web Design  Hosting * Internet  Intranet Applications Development *
 
 
  /*
  You boys lookin' for trouble?
  Sure.  Whaddya got?
  -- Marlon Brando, The Wild Ones
  */
 
 
  --
  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



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




Re: [PHP-DB] mysql_fetch_array limit? - more details

2002-07-30 Thread Andrey Hristov

Maybe it will help you but I've read that when using persistent connections
PHP uses 2 on every request.
So if in one moment you have 10 scripts,that use persistent connections,
running you will have 20 connections used to the mysql.

Regards,
Andrey
- Original Message -
From: Paul Worthington [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 30, 2002 5:34 PM
Subject: [PHP-DB] mysql_fetch_array limit? - more details


 I'm running MySQL 3.23.47 and PHP 4.1.2 on Mac OS X 10.1.5.

 In my table, I've got two fields: Name VARCHAR(35) and txtSWDesc1 TEXT.
 According to the manual, TEXT will give me a maximum space of 65,536
 bytes per field. I've entered text in this field in the amount of
 approximately
 500 characters.

 I'm using this PHP code, very simple and straightforward, to select two
 columns into an array and then display the results in an HTML table:


 ..
 $db = mysql_connect(localhost, user1);
 mysql_select_db(testdb,$db);
 $sql = SELECT * FROM tmp ORDER BY Name;
 $result = mysql_query($sql,$db);

 echo TABLE\n;
 echo TR\nTHPlace Name/TH\nTHDescription/TH\n/TR\n;
 while ($myrow = mysql_fetch_array($result)) {
   printf(TRTD%s/TDTD%s/TD/TR\n, $myrow[Name],
 $myrow[txtSWDesc1]);
 }
 echo /TABLE\n;


 ...
 What happens is I'm only getting the first 256 characters of txtSWDesc1
 displayed in my table. I am assuming the problem is in
 mysql_fetch_array(), that it must have some size limitation that
 truncates whatever data it has read to exactly 256 chars. Another
 possibility is that the mysql_query() could be truncing the result. I've
 checked my data directly in MySQL, and all the characters are there in
 direct SELECTs.

 Can someone please help? I've checked all manuals and FAQs I can, but I
 can't figure out why I'm having this problem. It should not be happening
 at all. Is there some size limitation to the array created via
 mysql_fetch_array()? Is there some other function that will accomodate
 my data? Is there any custom code to handle my data correctly?

 Thanks,
 Paul Worthington
 [EMAIL PROTECTED]


 --
 The views expressed here are those of the user, not necessarily those of
 Evolving Systems, Inc.



 --
 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




Re: [PHP-DB] mysql_fetch_array limit? - more details

2002-07-30 Thread Andrey Hristov

Do you have PhpMyAdmin installed? If you have try with it to see the
results. It uses native mysql functions.

Andrey

- Original Message -
From: Paul Worthington [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 30, 2002 7:53 PM
Subject: Re: [PHP-DB] mysql_fetch_array limit? - more details


 Thank you for that idea. I don't think that's it, though, because this
 script is the only one I'm ever running on this site. The problem is
 perfectly consistent and repeatable, which leads me to believe it's
 something in the way the array is being built.

 Paul Worthington
 [EMAIL PROTECTED]

 Andrey Hristov [EMAIL PROTECTED] wrote in message
 01cd01c237e8$7e1438b0$1601a8c0@nik">news:01cd01c237e8$7e1438b0$1601a8c0@nik...
  Maybe it will help you but I've read that when using persistent
 connections
  PHP uses 2 on every request.
  So if in one moment you have 10 scripts,that use persistent connections,
  running you will have 20 connections used to the mysql.
 
  Regards,
  Andrey
  - Original Message -
  From: Paul Worthington [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, July 30, 2002 5:34 PM
  Subject: [PHP-DB] mysql_fetch_array limit? - more details
 
 
   I'm running MySQL 3.23.47 and PHP 4.1.2 on Mac OS X 10.1.5.
  
   In my table, I've got two fields: Name VARCHAR(35) and txtSWDesc1
TEXT.
   According to the manual, TEXT will give me a maximum space of 65,536
   bytes per field. I've entered text in this field in the amount of
   approximately
   500 characters.
  
   I'm using this PHP code, very simple and straightforward, to select
two
   columns into an array and then display the results in an HTML table:
  
 


   ..
   $db = mysql_connect(localhost, user1);
   mysql_select_db(testdb,$db);
   $sql = SELECT * FROM tmp ORDER BY Name;
   $result = mysql_query($sql,$db);
  
   echo TABLE\n;
   echo TR\nTHPlace Name/TH\nTHDescription/TH\n/TR\n;
   while ($myrow = mysql_fetch_array($result)) {
 printf(TRTD%s/TDTD%s/TD/TR\n, $myrow[Name],
   $myrow[txtSWDesc1]);
   }
   echo /TABLE\n;
  
 


   ...
   What happens is I'm only getting the first 256 characters of
txtSWDesc1
   displayed in my table. I am assuming the problem is in
   mysql_fetch_array(), that it must have some size limitation that
   truncates whatever data it has read to exactly 256 chars. Another
   possibility is that the mysql_query() could be truncing the result.
I've
   checked my data directly in MySQL, and all the characters are there in
   direct SELECTs.
  
   Can someone please help? I've checked all manuals and FAQs I can, but
I
   can't figure out why I'm having this problem. It should not be
happening
   at all. Is there some size limitation to the array created via
   mysql_fetch_array()? Is there some other function that will accomodate
   my data? Is there any custom code to handle my data correctly?
  
   Thanks,
   Paul Worthington
   [EMAIL PROTECTED]
  
  
   --
   The views expressed here are those of the user, not necessarily those
of
   Evolving Systems, Inc.
  
  
  
   --
   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




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




Re: [PHP-DB] mysql_fetch_array limit? - more details

2002-07-30 Thread Andrey Hristov

  Hello,
last week I read this article :
http://phplens.com/lens/php-book/optimizing-debugging-php.php
It is long one. Extract from it (look where is it and read around it):
[snip]
Overload on 40 connections

When we pushed the benchmark to use 40 connections, the server overloaded
with 35% failed requests. On further investigation, it was because the MySQL
server persistent connects were failing because of Too Many Connections.

The benchmark also demonstrates the lingering behavior of Apache child
processes. Each PHP script uses 2 persistent connections, so at 40
connections, we should only be using at most 80 persistent connections, well
below the default MySQL max_connections of 100. However Apache idle child
processes are not assigned immediately to new requests due to latencies,
keep-alives and other technical reasons; these lingering child processes
held the remaining 20+ persistent connections that were the straws that
broke the Camel's back.

The Fix

By switching to non-persistent database connections, we were able to fix
this problem and obtained a result of 5.340 seconds. An alternative solution
would have been to increase the MySQL max_connections parameter from the
default of 100.

[/snip]

Andrey

- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Andrey Hristov [EMAIL PROTECTED]
Cc: Paul Worthington [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, July 30, 2002 7:59 PM
Subject: Re: [PHP-DB] mysql_fetch_array limit? - more details


 What do you mean it uses 2?  It does not.

 On Tue, 30 Jul 2002, Andrey Hristov wrote:

  Maybe it will help you but I've read that when using persistent
connections
  PHP uses 2 on every request.
  So if in one moment you have 10 scripts,that use persistent connections,
  running you will have 20 connections used to the mysql.
 
  Regards,
  Andrey
  - Original Message -
  From: Paul Worthington [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, July 30, 2002 5:34 PM
  Subject: [PHP-DB] mysql_fetch_array limit? - more details
 
 
   I'm running MySQL 3.23.47 and PHP 4.1.2 on Mac OS X 10.1.5.
  
   In my table, I've got two fields: Name VARCHAR(35) and txtSWDesc1
TEXT.
   According to the manual, TEXT will give me a maximum space of 65,536
   bytes per field. I've entered text in this field in the amount of
   approximately
   500 characters.
  
   I'm using this PHP code, very simple and straightforward, to select
two
   columns into an array and then display the results in an HTML table:
  
 

   ..
   $db = mysql_connect(localhost, user1);
   mysql_select_db(testdb,$db);
   $sql = SELECT * FROM tmp ORDER BY Name;
   $result = mysql_query($sql,$db);
  
   echo TABLE\n;
   echo TR\nTHPlace Name/TH\nTHDescription/TH\n/TR\n;
   while ($myrow = mysql_fetch_array($result)) {
 printf(TRTD%s/TDTD%s/TD/TR\n, $myrow[Name],
   $myrow[txtSWDesc1]);
   }
   echo /TABLE\n;
  
 

   ...
   What happens is I'm only getting the first 256 characters of
txtSWDesc1
   displayed in my table. I am assuming the problem is in
   mysql_fetch_array(), that it must have some size limitation that
   truncates whatever data it has read to exactly 256 chars. Another
   possibility is that the mysql_query() could be truncing the result.
I've
   checked my data directly in MySQL, and all the characters are there in
   direct SELECTs.
  
   Can someone please help? I've checked all manuals and FAQs I can, but
I
   can't figure out why I'm having this problem. It should not be
happening
   at all. Is there some size limitation to the array created via
   mysql_fetch_array()? Is there some other function that will accomodate
   my data? Is there any custom code to handle my data correctly?
  
   Thanks,
   Paul Worthington
   [EMAIL PROTECTED]
  
  
   --
   The views expressed here are those of the user, not necessarily those
of
   Evolving Systems, Inc.
  
  
  
   --
   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
 


 --
 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




Re: [PHP-DB] mysql_fetch_array limit? - more details

2002-07-30 Thread Andrey Hristov

Yeaah!
I am a fool. My biggest excuses.
Sorry Rasmus and everyone else.

Andrey

- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Andrey Hristov [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, July 30, 2002 8:11 PM
Subject: Re: [PHP-DB] mysql_fetch_array limit? - more details


 The only reason it uses two is if the code using persistent connections
 connects with different credentials.  ie. you have 2 different apps on the
 same server that connects as 2 different user ids and they are both using
 persistent connections.  Eventually every httpd will have 2 connections.

 -R

 On Tue, 30 Jul 2002, Andrey Hristov wrote:

Hello,
  last week I read this article :
  http://phplens.com/lens/php-book/optimizing-debugging-php.php
  It is long one. Extract from it (look where is it and read around it):
  [snip]
  Overload on 40 connections
 
  When we pushed the benchmark to use 40 connections, the server
overloaded
  with 35% failed requests. On further investigation, it was because the
MySQL
  server persistent connects were failing because of Too Many
Connections.
 
  The benchmark also demonstrates the lingering behavior of Apache child
  processes. Each PHP script uses 2 persistent connections, so at 40
  connections, we should only be using at most 80 persistent connections,
well
  below the default MySQL max_connections of 100. However Apache idle
child
  processes are not assigned immediately to new requests due to latencies,
  keep-alives and other technical reasons; these lingering child processes
  held the remaining 20+ persistent connections that were the straws that
  broke the Camel's back.
 
  The Fix
 
  By switching to non-persistent database connections, we were able to fix
  this problem and obtained a result of 5.340 seconds. An alternative
solution
  would have been to increase the MySQL max_connections parameter from the
  default of 100.
 
  [/snip]
 
  Andrey
 
  - Original Message -
  From: Rasmus Lerdorf [EMAIL PROTECTED]
  To: Andrey Hristov [EMAIL PROTECTED]
  Cc: Paul Worthington [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Sent: Tuesday, July 30, 2002 7:59 PM
  Subject: Re: [PHP-DB] mysql_fetch_array limit? - more details
 
 
   What do you mean it uses 2?  It does not.
  
   On Tue, 30 Jul 2002, Andrey Hristov wrote:
  
Maybe it will help you but I've read that when using persistent
  connections
PHP uses 2 on every request.
So if in one moment you have 10 scripts,that use persistent
connections,
running you will have 20 connections used to the mysql.
   
Regards,
Andrey
- Original Message -
From: Paul Worthington [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 30, 2002 5:34 PM
Subject: [PHP-DB] mysql_fetch_array limit? - more details
   
   
 I'm running MySQL 3.23.47 and PHP 4.1.2 on Mac OS X 10.1.5.

 In my table, I've got two fields: Name VARCHAR(35) and txtSWDesc1
  TEXT.
 According to the manual, TEXT will give me a maximum space of
65,536
 bytes per field. I've entered text in this field in the amount of
 approximately
 500 characters.

 I'm using this PHP code, very simple and straightforward, to
select
  two
 columns into an array and then display the results in an HTML
table:

   
 

 ..
 $db = mysql_connect(localhost, user1);
 mysql_select_db(testdb,$db);
 $sql = SELECT * FROM tmp ORDER BY Name;
 $result = mysql_query($sql,$db);

 echo TABLE\n;
 echo TR\nTHPlace Name/TH\nTHDescription/TH\n/TR\n;
 while ($myrow = mysql_fetch_array($result)) {
   printf(TRTD%s/TDTD%s/TD/TR\n, $myrow[Name],
 $myrow[txtSWDesc1]);
 }
 echo /TABLE\n;

   
 

 ...
 What happens is I'm only getting the first 256 characters of
  txtSWDesc1
 displayed in my table. I am assuming the problem is in
 mysql_fetch_array(), that it must have some size limitation that
 truncates whatever data it has read to exactly 256 chars. Another
 possibility is that the mysql_query() could be truncing the
result.
  I've
 checked my data directly in MySQL, and all the characters are
there in
 direct SELECTs.

 Can someone please help? I've checked all manuals and FAQs I can,
but
  I
 can't figure out why I'm having this problem. It should not be
  happening
 at all. Is there some size limitation to the array created via
 mysql_fetch_array()? Is there some other function that will
accomodate
 my data? Is there any custom code to handle my data correctly?

 Thanks,
 Paul Worthington
 [EMAIL PROTECTED]


 --
 The views expressed here are those of the user, not necessarily
those
  of
 Evolving Systems, Inc

Re: [PHP-DB] Global variables, $_GET problem

2002-07-24 Thread Andrey Hristov



- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 24, 2002 6:45 AM
Subject: Re: [PHP-DB] Global variables, $_GET problem


 On Wednesday 24 July 2002 11:38, Ruth Zhai wrote:

  We just upgraded our PHP to version 4.2.1.  I realized that $var is no
  longer available from www.url.com/myphp.php?var=3 .  As instructed in
the
  document, we have tried two things:

 Good, someone who reads the docs :)

  1. I tried to use $_GET('var'), however, I got Fatal error: Call to
  undefined function: array() in /home/httpd/...  message.  I have no
clue
  what this means, and what I have done wrong.

 It should be $GET['var'].

It should be $_GET['var']




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




Re: [PHP-DB] Re: PicoSQL!

2002-07-24 Thread Andrey Hristov

There is another small RDBMS that supports subset of the ANSI-92 standart.
It's name is SQLite
there is a module for it here :http://sourceforge.net/projects/sqlite-php/
MOre info about SQLite here : http://www.hwaci.com/sw/sqlite/


Regards,
Andrey

- Original Message -
From: Pentothal [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 25, 2002 10:27 AM
Subject: [PHP-DB] Re: PicoSQL!


 Pentothal wrote:

  I guess this is the wrong place to ask for a new PHP
  feature, but ... I don't know where else to ask!
 
  I just want to signal to C skilled (and willing) people
  here that there is a new interesting RDBMS server called
  picoSQL (www.picosoft.it).

 This page has an english section:

 http://www.picosoft.it/picosql/

  Besides beeing really small it's really full-featured and
  fast. It's available for Linux and NT, it has a windows
  ODBC driver (and JDBC driver, too), and ODBC 2.5 compliant
  C/C++ API. It supports transactions, row level locking,
  BLOBS, sub-queries and more...
 
  Well: it needs a PHP module!
 
  P.S.
 
  Last but not least: it distributed under GPL !



 --
 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




Re: [PHP-DB] database absraction layer

2002-05-06 Thread Andrey Hristov

Look at PEAR repository for userspace abstraction layer.
Look at the dbx extension for compiled abstraction layer.

Andrey

- Original Message -
From: adi [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 07, 2002 4:08 AM
Subject: [PHP-DB] database absraction layer


 dear all,

 I'm writing  database abstraction layer class (like adoDB but much
simpler).
 What I want to do that it will provide single access function for
different
 type of database. Currently, it will only support mySQL and PostgreSQL..
but I
 just don't know how to do this with better approach.

 code snippet..

 ..
 function connect(){
 if($this-type == mysql){
 $this-conid = mysql_connect($this-host,$this-user,$this-pass);
 }
 elseif($this-type == pgsql)){
 $this-conid = pg_connect($this-host $this-port $this-db $this-user
 $this-pass); }
 else {
 echo (database type $this-type not supported);
 }
 }
 ..

 any idea of doing such of function alias/wrapper?
 any help appreciated
 thanks

 ___
 adi.aroundbali.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




[PHP-DB] Re: Re:[2] [PHP-DB] database absraction layer

2002-05-06 Thread Andrey Hristov

You can use PEAR nevertheless they don't have it in the config. PEAR is
userspace, so you can get it from everywhere put it everywhere in you home
dir or in subdirs, and just refer to it with require and include. But be
aware that there can be relative include/require in the PEAR that have to be
satisfied
It's like getting a script from hotscripts.com or a class from
phpclasses.org and using it.

Andrey

- Original Message -
From: adi [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 07, 2002 5:02 AM
Subject: Re:[2] [PHP-DB] database absraction layer


 thanks,
 but what I want is, they don't have to --enable-dbx or enable pear in
their php
 configuration to be able to use this class.


 Andrey Hristov [EMAIL PROTECTED] wrote on 5/7/02 9:29:24 AM:
 
 Look at PEAR repository for userspace abstraction layer.
 Look at the dbx extension for compiled abstraction layer.
 
 Andrey
 
 - Original Message -
 From: adi [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, May 07, 2002 4:08 AM
 Subject: [PHP-DB] database absraction layer
 
 
  dear all,
 
  I'm writing  database abstraction layer class (like adoDB but much
 simpler).
  What I want to do that it will provide single access function for
 different
  type of database. Currently, it will only support mySQL and
PostgreSQL..
 but I
  just don't know how to do this with better approach.
 
  code snippet..
 
  ..
  function connect(){
  if($this-type == mysql){
  $this-conid = mysql_connect($this-host,$this-user,$this-pass);
  }
  elseif($this-type == pgsql)){
  $this-conid = pg_connect($this-host $this-port $this-db $this-user
  $this-pass); }
  else {
  echo (database type $this-type not supported);
  }
  }
  ..
 
  any idea of doing such of function alias/wrapper?
  any help appreciated
  thanks




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




Re: [PHP-DB] how to bring down the mysqlserver without getting an inconsistant db?

2002-04-11 Thread Andrey Hristov

Get all table names in a db and lock them :show tables;;

Andrey 
- Original Message - 
From: andy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 11, 2002 7:37 PM
Subject: [PHP-DB] how to bring down the mysqlserver without getting an inconsistant db?


 Hi there,
 
 I am wondering what would be the best way to update a db. I would like to
 bring down the server, but I am afraid to get
 an inconsistant state of data. What if someone is just registering on
 another db? Is there a way to flush and lock the whole db not just some
 tables?
 
 Thanx,
 
 Andy
 
 PS: what would be the best way to exchange data on a running server? For
 example... a db containing geodata should be updated, but the user db should
 be running ok
 
 
 
 -- 
 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




Re: [PHP-DB] how to bring down the mysqlserver without getting an inconsistant db?

2002-04-11 Thread Andrey Hristov

Have in mind this :
LOCK TABLES locks tables for the current thread. UNLOCK TABLES releases any locks held 
by the current thread. All tables that are
locked by the current thread are automatically unlocked when the thread issues another 
LOCK TABLES, or when the connection to the
server is closed.

Andrey
- Original Message -
From: andy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 11, 2002 7:47 PM
Subject: Re: [PHP-DB] how to bring down the mysqlserver without getting an 
inconsistant db?


 what if I have 50 tables??


 Andrey Hristov [EMAIL PROTECTED] schrieb im Newsbeitrag
 02f701c1e177$abd40040$0b01a8c0@ANDreY">news:02f701c1e177$abd40040$0b01a8c0@ANDreY...
  Get all table names in a db and lock them :show tables;;
 
  Andrey
  - Original Message -
  From: andy [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, April 11, 2002 7:37 PM
  Subject: [PHP-DB] how to bring down the mysqlserver without getting an
 inconsistant db?
 
 
   Hi there,
  
   I am wondering what would be the best way to update a db. I would like
 to
   bring down the server, but I am afraid to get
   an inconsistant state of data. What if someone is just registering on
   another db? Is there a way to flush and lock the whole db not just some
   tables?
  
   Thanx,
  
   Andy
  
   PS: what would be the best way to exchange data on a running server? For
   example... a db containing geodata should be updated, but the user db
 should
   be running ok
  
  
  
   --
   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




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




Re: [PHP-DB] LIMIT 0,10 retrieves 10 records, but takes forever!

2002-03-31 Thread Andrey Hristov

LIMIT limits only to output.
So if a SELECT creates 1 million rows and you LIMIT 10, you got the first 10 rows but 
the full SELECT is done.
To speedup consider adding some id columnt with unique ints in ascending order.


Andrey

P.S.
I've to go. Have a nice evening.

- Original Message - 
From: Andy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, March 31, 2002 6:29 PM
Subject: [PHP-DB] LIMIT 0,10 retrieves 10 records, but takes forever!


 Hi there,
 
 I am having a problem understanding how limit works. As I thought limit
 restricts the amount of results
 to a given number. True.. the number of results is only that high how high I
 specify it with limit.
 
 But the querry takes as long as without limit. I am trying to avoid to long
 waiting times if a user is
 by exident searching for to many records.
 
 This is my querry:
 
  SELECT c.*, p.province, co.country
  FROM test.cities c, test.provinces p, test.countries co
  WHERE c.city like 'd%'
   AND p.province_no = c.province_id
   AND p.country_c = c.country_c
   AND c.country_c = co.country_c
  ORDER BY country , province
  limit 0, 10
 
 This takes 30 s on a 2.5 mio entries table
 
 How could I really restrict the results to 10. So that mysql just returns
 after 10 results?
 
 Thanx, Andy
 
 
 
 
 -- 
 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




Re: [PHP-DB] LIMIT 0,10 retrieves 10 records, but takes forever!

2002-03-31 Thread Andrey Hristov

Another suggestion - use explicit joins.
  SELECT c.*, p.province, co.country
FROM test.cities AS c LEFT JOIN test.countries AS co USING(country_c)
LEFT JOIN test.provinces AS p ON c.province_no=p.province_id
ORDER BY country , province
  limit 0, 10;

This might work. If not read the docs at http://www.mysql.com/doc/
about joins and how to do LEFT(RIGHT) JOIN.

Good luck.

Andrey
 
- Original Message - 
From: Andy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, March 31, 2002 6:29 PM
Subject: [PHP-DB] LIMIT 0,10 retrieves 10 records, but takes forever!


 Hi there,
 
 I am having a problem understanding how limit works. As I thought limit
 restricts the amount of results
 to a given number. True.. the number of results is only that high how high I
 specify it with limit.
 
 But the querry takes as long as without limit. I am trying to avoid to long
 waiting times if a user is
 by exident searching for to many records.
 
 This is my querry:
 
  SELECT c.*, p.province, co.country
  FROM test.cities c, test.provinces p, test.countries co
  WHERE c.city like 'd%'
   AND p.province_no = c.province_id
   AND p.country_c = c.country_c
   AND c.country_c = co.country_c
  ORDER BY country , province
  limit 0, 10
 
 This takes 30 s on a 2.5 mio entries table
 
 How could I really restrict the results to 10. So that mysql just returns
 after 10 results?
 
 Thanx, Andy
 
 
 
 
 -- 
 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




Re: [PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem with cp1215

2002-03-28 Thread Andrey Hristov

Do you receive ???s ?

Regards,
Andrey


- Original Message - 
From: Igor Georgiev [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 27, 2002 7:11 PM
Subject: [PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem with cp1215


PHP 4.1.2
Apache 1.3.23
Slackware 7.1
Sybase: Adaptive Server Anywhere 8
iODBC - libiodbc-3.0.5

database created with 1251CYR collation
work fine with cyrillic strings trough windows app (ODBC)
but with PHP on linux trough iODBC  Adaptive Server Anywhere ODBC driver 8.0.x not

 ODBC.INI-
[ODBC Data Sources]
aaa=Adaptive Server Anywhere ODBC driver 8.0.x

[aaa]
Driver=/usr/local/sybase/SYBSsa8/lib/dbodbc8.so
ServerName=alpha
CommLinks=tcpip
CS=cp1251


tried also
CS=1251CYR
CS=Charset=cp1251;CollationLabel=1251CYR
Charset=cp1251
CollationLabel=1251CYR

Any help be welcome 10x



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




Re: [PHP-DB] Reading a file and inserting into Access

2002-03-28 Thread Andrey Hristov

Is it possible Access to load a bunch of SQLs and execute them? If it is possible it 
is better than CSV. Mysql has a command-line
tool for table  database dump into SQLs. Another solution is to look at PHPMyAdmin's 
code to view how it dumps tables.


Best regards,
Andrey Hristov

- Original Message -
From: George Pitcher [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 28, 2002 1:06 PM
Subject: [PHP-DB] Reading a file and inserting into Access


 I'm currently working on a solution to distribute to my users. I will be
 sending them updates of tab-separated records to import into their Access
 databases. the distributed solution is php-based and I would like to be able
 to build in an admin utility to allow them to select the file and iupload it
 into a particular table.

 Just to save starting from scratch, does anyone have something like this,
 that they are prepared to share?

 Regards

 George in Edinburgh

 BTW my users are all university staff.


 --
 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




Re: [PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem with cp1215

2002-03-28 Thread Andrey Hristov

This seems a unicode problem to me.
Here we have similar problem when PHP connects to Access 2000 and receives ???s. No 
problems with Access 97. Are you sure that the
data is 1 byte not unicode format?

Andrey
- Original Message -
From: Igor Georgiev [EMAIL PROTECTED]
To: Andrey Hristov [EMAIL PROTECTED]
Sent: Thursday, March 28, 2002 2:20 PM
Subject: Re: [PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem with cp1215


 I recive this
 PHP   -  
 in DB - Нормативна уредба
 - Original Message -
 From: Andrey Hristov [EMAIL PROTECTED]
 To: Igor Georgiev [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Thursday, March 28, 2002 12:09 PM
 Subject: Re: [PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem
 with cp1215


  Do you receive ???s ?
 
  Regards,
  Andrey
 
 
  - Original Message -
  From: Igor Georgiev [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, March 27, 2002 7:11 PM
  Subject: [PHP-DB] Sybase: Adaptive Server Anywhere 8 on Linux: problem
 with cp1215
 
 
  PHP 4.1.2
  Apache 1.3.23
  Slackware 7.1
  Sybase: Adaptive Server Anywhere 8
  iODBC - libiodbc-3.0.5
 
  database created with 1251CYR collation
  work fine with cyrillic strings trough windows app (ODBC)
  but with PHP on linux trough iODBC  Adaptive Server Anywhere ODBC driver
 8.0.x not
 
   ODBC.INI-
  [ODBC Data Sources]
  aaa=Adaptive Server Anywhere ODBC driver 8.0.x
 
  [aaa]
  Driver=/usr/local/sybase/SYBSsa8/lib/dbodbc8.so
  ServerName=alpha
  CommLinks=tcpip
  CS=cp1251
 
  
  tried also
  CS=1251CYR
  CS=Charset=cp1251;CollationLabel=1251CYR
  Charset=cp1251
  CollationLabel=1251CYR
 
  Any help be welcome 10x
 
 




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




[PHP-DB] Re: [PHP] PHP and Oracle

2002-03-26 Thread Andrey Hristov

 On Mon, Mar 25, 2002 at 02:49:07PM -0500, Scarbrough, Jeb (ISS Atlanta) wrote:
  Is it possible to create a transaction the involves multiple pages using PHP
  and oracle.  For example, can I log onto oracle using OCIPLogon on one page
  named master, insert information, go to the next page named detail, insert
  information and commit both transactions at the same time?

Try using sessions. The easies way is to save your sqls in a array that is session 
variable and run these sqls on the second page.

Regards,
Andrey


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




Re: [PHP-DB] variation on(Speed Up Code?)

2002-03-26 Thread Andrey Hristov

Do some profiling. Use PEAR's Timer class or just add here and there some echo 
microtime(). Find where is spent most of the time. If
it is in the queries than look at your db and find out whether you missed to add some 
index. If indexes are ok, try to make joined
queries (for mysql - LEFT JOIN (RIGHT JOIN) is probably the best choice escpecially if 
you have very big tables).


Regards,
Andrey Hristov

- Original Message -
From: George Pitcher [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; PHP-DB [EMAIL PROTECTED]
Sent: Tuesday, March 26, 2002 10:49 AM
Subject: [PHP-DB] variation on(Speed Up Code?)


 Hi all,

 One of the pages in my site takes up to 10 seconds to display (depending on
 number of records (30 records takes 10 secs).

 The cause of the problem is the amount of information I am displaying for
 each record. I do multiple queries for each record to find out different
 things such as its position in the workflow, its price, etc. None of these
 are stored in the db, but are calculated on the fly depending on the data
 held.

 Apart from storing the result in the db can anyone point me in the direction
 of some efficient handling routines?

 Code is available if anyone wants bloat-mail!

 MTIA

 George in Edinburgh


 --
 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




Re: [PHP-DB] Comparing Strings

2002-03-25 Thread Andrey Hristov

If using mysql then the string comparison of fields is case insensitive except if the 
(var)char column is BINARY.
AFAIK mysql has support for RegEx-es. If you decide to use PHP, then use 
preg_match/replace but with 'i' modifier. This will make
the search case-insensitivi and will be faster than eregi().



Regards,
Andrey Hristov
- Original Message -
From: John Fishworld [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 25, 2002 12:59 PM
Subject: [PHP-DB] Comparing Strings


 Whats the best way to compare 2 strings (city names - one in db one user
 entry)
 At the moment I'm thinking to do the following ;

 strip spaces
 convert to lower
 and then compare !

 Has anyone got any better/other suggestions ??

 regards
 John



 --
 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




Re: [PHP-DB] Relational database

2002-03-22 Thread Andrey Hristov

Otidi tuk : http://www.php.net/unsub.php i vig kak se pravi Unsubscribe

Andrey

- Original Message - 
From: Stefan [EMAIL PROTECTED]
To: 'Andrey Hristov' [EMAIL PROTECTED]; 'Ron' [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, March 22, 2002 10:37 AM
Subject: RE: [PHP-DB] Relational database


 Dear friends at [EMAIL PROTECTED],
 
 I am an innocent guy from Bulgaria and somehow I got in to your mailing
 list ([EMAIL PROTECTED]  [EMAIL PROTECTED]). Now I got all of your
 mails and I am sure this is a mistake.
 

 -- 
 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




Re: [PHP-DB] Selecting Alphabetically

2002-03-21 Thread Andrey Hristov

select * from sometable where (SUBSTRING(somefield,1,1) in 
('a','b','c','d','f','g','h')) AND (SUBSTRING(somefield,2,1) in
('i','j','k','l','m','n','o','p'));

Best regards,
Andrey Hristov

- Original Message -
From: Jordan Elver [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 21, 2002 2:05 PM
Subject: [PHP-DB] Selecting Alphabetically


 Hi,
 Could anyone point me in the right direction with this one please.
 I have a table of records wit a field of artists.

 I want to select all the records which begin with the letter a-h then i-p etc

 What is the best way to do this?

 Cheers,
 Jord

 --
 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




Re: [PHP-DB] How to add 2 years to todays date ?

2002-03-18 Thread Andrey Hristov

In php
$your_timestamp += gmmktime(0,0,0,1,1,1972);
MySQL has INTERVALling options.

Regards,
Andrey

- Original Message - 
From: Dave Carrera [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 18, 2002 10:11 AM
Subject: [PHP-DB] How to add 2 years to todays date ?


 Hi All
 I think the subject line says it all.
  
 How to add 2 years to today's date ?
  
 Any helps as always most appreciated.
  
  
  
 Dave Carrera
 Php Developer
 http://davecarrera.freelancers.net
 http://www.davecarrera.com
  
  
 


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




Re: [PHP-DB] a Count() ?

2002-03-16 Thread Andrey Hristov

select cat_id, count(prod_id) from some_table order by cat_id;

Best regards,

Andrey Hristov

- Original Message - 
From: Dave Carrera [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 16, 2002 12:46 PM
Subject: [PHP-DB] a Count() ?


 Hi All
  
 I am trying to count how many product names in my db have the same
 category id and then show it ie:
  
 Catid 1 Product 1
 Catid 1 Product 2
 Catid 2 Product 3
 Catid 3 Product 4
 Catid 3 Product 5
  
 Result would be
  
 Catid1 has 2 products
 Catid2 has 1 products
 Catid3 has 2 products
  
 I think it has something to do with the GROUP command but the mysql doc
 dose not make it clear how to achive this task.
  
 Code examples, pointers to web resources or any info thankfully
 received.
  
 Thank you in advance
  
  
 Dave Carrera
 Php Developer
 http://davecarrera.freelancers.net
 http://www.davecarrera.com
  
  
 


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




Re: [PHP-DB] Joining three tables

2002-03-16 Thread Andrey Hristov

Try joining parents to parentlog by left using(parent_id) . If you receive 1 row for 
student that has 2 parents (I say this because
I've never been in such situation) try to join but not left - ordinary join. So
select * from students left join parentlog using(student_id) left join parents 
using(parent_id);
or
select * from parents,parentlog left join students using(student_id) where 
parents.parent_id=parentlog.parent_id;

Hope this helps.

Andrey Hristov

- Original Message -
From: John Hughes, Jomari Works [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 16, 2002 8:23 AM
Subject: [PHP-DB] Joining three tables


 SQL QUERY question

 I have three tables:

 students has student_id and student_name
 parents has parent_id and parent_name
 parentlog has student_id and parent_id

 I want to search the parentlog WHERE student_id = some_id
 GROUP BY parent_id

 (This will bring back two rows when there are two parents)

 At the same time I want to get the name of the student that
 matches student_id and the name of the parent.

 I can LEFT JOIN students with parentlog USING(student_id) but
 I can't figure how I can join the parents so that I can get
 the name of match for the parent_id.

 Can I join three tables and search all in one pass?

 TIA

 John Hughes


 --
 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




Re: [PHP-DB] Looking for a good MySQL db abstraction layer

2002-03-08 Thread Andrey Hristov

Try those provided in PEAR(in the distro).

Best regards,
Andrey Hristov

On Friday 08 March 2002 08:04 pm, you wrote:
 I'm looking for a good MySQL db abstraction layer. I'm just coming back to
 PHP/MySQL and rather writing my own I figured I'd try to see if any are
 already out there.

 The layer should obviously have the basics, of connect, query, and close,
 and possibly some error checking and handling.

 thanks,
 ~ Mike

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




Re: [PHP-DB] Is this possible in mysql?

2002-03-08 Thread Andrey Hristov

list($sum)=mysql_fetch_assoc(mysql_query('SELECT SUM(salary') FROM employes;'));

Best regards,
Andrey Hristov

On Friday 08 March 2002 09:17 pm, you wrote:
 I need to add up the (integer) values of columns, and return the added up
 value as one column to php.  Is this possible?  Or is there something else
 to do it? (I'd rather not have to mysql_fetch_array() in a while loop and
 add it up there, it might be a lot of rows)

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




Re: [PHP-DB] Problem with symbol

2002-02-25 Thread Andrey Hristov

phpMyAdmin has changed  to amp; and then put it in the DB.
So it is better not to use phpMyAdmin or any toher web based tool for tasks which 
includes  entering. Not sure for ,

Regards,
Andrey Hristov
- Original Message - 
From: Marco Coletta [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 25, 2002 10:32 AM
Subject: Re: [PHP-DB] Problem with symbol 


 I edit with phpMyAdmin and Mascon, but if I look at the recodr with Mysql
 client I have the same result :
 in the record I find amp; instead of 
 
 
 Andrey Hristov [EMAIL PROTECTED] ha scritto nel messaggio
 00f401c1bdd4$7d3bec00$0b01a8c0@ANDreY">news:00f401c1bdd4$7d3bec00$0b01a8c0@ANDreY...
  The problem is that you probably use phpMyAdmin for editing data.
 
  Regards,
  Andrey Hristov
  - Original Message -
  From: Marco Coletta [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, February 25, 2002 10:08 AM
  Subject: [PHP-DB] Problem with symbol 
 
 
   I have a problem with symbol .
  
   In PHP script I have a variable with a string assigned containing the
   symbol '' :
  
   $myvariable = 'Smith  Sons';
   when I insert the variable in the database :
  
   $query=insert into mytable (mycolumn) values
   (myvalue1='$myvariable');;
  
   $result=mysql_query($query);
  
   if  I edit directly the column in Mysql the symbol '' has been
   translated to 'amp;'.
  
   The real problem is that if I do a query with where looking for the
 content
   of record where myvalue='Smith  Sons'
   in this case the symbol  is not translated and so the query has no
 success.
  
  
  
  
  
  
  
   --
  
  
  
  
   --
   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
 
 


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




Re: [PHP-DB] Problem with symbol

2002-02-25 Thread Andrey Hristov

The problem was solved. The programmer used htmlspecialchars() in one of his functions.
So the function was the problem. No problemas with phpMyAdmin - too clever.

Andrey

- Original Message - 
From: Jonathan Underfoot [EMAIL PROTECTED]
To: [PHP-DB] [EMAIL PROTECTED]
Sent: Monday, February 25, 2002 3:37 PM
Subject: Re: [PHP-DB] Problem with symbol 


 In my experience PHPMyAdmin DOES NOT change anything.  It never changes 
 for me, and it dosen't addslashes(), which makes it a complete pain in the
 ass to use, but better than changing things without your knowledge I
 suppose.  Maybe I'm using an old version?
 
 -Jonathan
 - Original Message -
 From: Marco Coletta [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, February 25, 2002 3:42 AM
 Subject: Re: [PHP-DB] Problem with symbol 
 
 
  It's not phpMyadmin that changed  to amp; but the PHP script.
  Than because I could not find with the PHP script the record I looked in
  with phpMyadmin.
 
 
  Andrey Hristov [EMAIL PROTECTED] ha scritto nel messaggio
  010801c1bdd7$576e9dd0$0b01a8c0@ANDreY">news:010801c1bdd7$576e9dd0$0b01a8c0@ANDreY...
   phpMyAdmin has changed  to amp; and then put it in the DB.
   So it is better not to use phpMyAdmin or any toher web based tool for
  tasks which includes  entering. Not sure for ,
  
   Regards,
   Andrey Hristov
   - Original Message -
   From: Marco Coletta [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Monday, February 25, 2002 10:32 AM
   Subject: Re: [PHP-DB] Problem with symbol 
  
  
I edit with phpMyAdmin and Mascon, but if I look at the recodr with
  Mysql
client I have the same result :
in the record I find amp; instead of 
   
   
    Andrey Hristov [EMAIL PROTECTED] ha scritto nel messaggio
00f401c1bdd4$7d3bec00$0b01a8c0@ANDreY">news:00f401c1bdd4$7d3bec00$0b01a8c0@ANDreY...
 The problem is that you probably use phpMyAdmin for editing data.

     Regards,
     Andrey Hristov
 - Original Message -
 From: Marco Coletta [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, February 25, 2002 10:08 AM
 Subject: [PHP-DB] Problem with symbol 


  I have a problem with symbol .
 
  In PHP script I have a variable with a string assigned containing
  the
  symbol '' :
 
  $myvariable = 'Smith  Sons';
  when I insert the variable in the database :
 
  $query=insert into mytable (mycolumn) values
  (myvalue1='$myvariable');;
 
  $result=mysql_query($query);
 
  if  I edit directly the column in Mysql the symbol '' has been
  translated to 'amp;'.
 
  The real problem is that if I do a query with where looking for
 the
content
  of record where myvalue='Smith  Sons'
  in this case the symbol  is not translated and so the query has
 no
success.
 
 
 
 
 
 
 
  --
 
 
 
 
  --
  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
   
   
  
 
 
 
  --
  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
 
 


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




Re: [PHP-DB] Shopping Cart ?

2002-02-24 Thread Andrey Hristov

Hi
There are functions for the Verisign API. For those servers with no compiled module 
for Verisign try to use the
Verisign package from PEAR repository. You can get it from the CVS - cvs.php.net   
l:cvsread, p:phpfi
Look at the docs what command to issue to get the pear package(write pear instead of 
php4).

Best regards,
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS

- Original Message - 
From: Dave Carrera [EMAIL PROTECTED]
To: php List [EMAIL PROTECTED]
Sent: Monday, February 25, 2002 9:50 AM
Subject: [PHP-DB] Shopping Cart ?


 Hi All,
 
 I am developing a shopping cart for a customer. No Prob there.
 
 Is there any info around, or can someone supply, on how to
 
 Link the buy button to a ccp.
 
 I think what I mean is the customer has no credit card processor at the
 moment
 
 So I want to be flexible with the buy button links ( I think...).
 
 Is there some kind of code example for this.
 
 As Always thank you in advance for any snippets of wisdom.
 
 Dave Carrera
 Php / MySql Development
 Web Design
 Site Marketing
 http://www.davecarrera.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




Re: [PHP-DB] Problem with symbol

2002-02-24 Thread Andrey Hristov

The problem is that you probably use phpMyAdmin for editing data. 

Regards,
Andrey Hristov
- Original Message - 
From: Marco Coletta [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 25, 2002 10:08 AM
Subject: [PHP-DB] Problem with symbol 


 I have a problem with symbol .
 
 In PHP script I have a variable with a string assigned containing the
 symbol '' :
 
 $myvariable = 'Smith  Sons';
 when I insert the variable in the database :
 
 $query=insert into mytable (mycolumn) values
 (myvalue1='$myvariable');;
 
 $result=mysql_query($query);
 
 if  I edit directly the column in Mysql the symbol '' has been
 translated to 'amp;'.
 
 The real problem is that if I do a query with where looking for the content
 of record where myvalue='Smith  Sons'
 in this case the symbol  is not translated and so the query has no success.
 
 
 
 
 
 
 
 --
 
 
 
 
 -- 
 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




Re: [PHP-DB] Getting the ID of the last inserted record possible?

2002-02-23 Thread Andrey Hristov

mysql_insert_id()


Regards
Andrey
- Original Message - 
From: Andy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, February 23, 2002 3:32 PM
Subject: [PHP-DB] Getting the ID of the last inserted record possible?


 Hi there,
 
 I would like to name pictures I uploaded after the belonging ID in the db.
 
 Is there a way to find out the ID of the last record. I thought it might be
 a good idea to create the record, get the ID and copy the image with the ID
 as name to the server.
 
 Can anybody give me a hint on that?
 
 Thanx Andy
 
 
 
 -- 
 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




Re: [PHP-DB] Disable Right click w/ php?

2002-02-14 Thread Andrey Hristov

No way. PHP is server-side. Javascript is mostly clientside.

Best regards,
Andrey Hristov
- Original Message - 
From: jas [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 14, 2002 8:17 AM
Subject: [PHP-DB] Disable Right click w/ php?


 I have been looking on php.net for a function to disallow people to right
 click to view source... anyone have a good idea of how to accomplish this
 without using java-script?
 Thanks in advance,
 Jas
 
 
 
 -- 
 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




Re: [PHP-DB] MySQL Result Resource

2002-01-10 Thread Andrey Hristov

try this :

select password, 1 as auth from acl where (username='andrewd' and 
password=MD5(andrewd.madonna));
- Original Message - 
From: Necro [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 10, 2002 6:18 PM
Subject: RE: [PHP-DB] MySQL Result Resource


 Same error...
 
 select password, 1 as auth from acl where (username='andrewd' and
 password=MD5(andrewd.madonna))1109 : Unknown table 'andrewd' in where clause
 
 Andrew
 
 -Original Message-
 From: George Pitcher [mailto:[EMAIL PROTECTED]]
 Sent: Friday, 11 January 2002 3:10 AM
 To: Necro; [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] MySQL Result Resource
 
 
 I was having something similar and solved it by wrapping the column names in
 parentheses:
 
 select password, 1 as auth from acl where (username='andrewd' and
  password=MD5(andrewd.madonna));
 
 It might help. or eliminate something if I'm not right.
 
 George
 - Original Message -
 From: Necro [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, January 10, 2002 4:09 PM
 Subject: RE: [PHP-DB] MySQL Result Resource
 
 
  Yep,
 
  andrewd is the username im trying to get this script to work with, its an
  authentication script..
 
  The result of echo $arg is the following:
 
  select password, 1 as auth from acl where username='andrewd' and
  password=MD5(andrewd.madonna)1109 : Unknown table 'andrewd' in where
 clause
 
  Andrew
 
  -Original Message-
  From: Miles Thompson [mailto:[EMAIL PROTECTED]]
  Sent: Friday, 11 January 2002 3:08 AM
  To: Necro; [EMAIL PROTECTED]
  Subject: RE: [PHP-DB] MySQL Result Resource
 
 
  Can you try this puppy at the MySQL console? I'd dearly love to know where
  andrewd is coming from, it sounds like your username.
 
  Before executing mysql_query(), echo $arg and see what it prints.
 
  This is strange, but better than what we had - Miles Thompson
 
  At 02:54 AM 1/11/2002 +1100, Necro wrote:
  Ok,
  I have tried a few things now. I finally got it to echo the errors,
 firstly
  there was still a prob with MD5 values being in the apostrophes.
  Then next error was no db was selected. So i added a mysql_select_db
  statement.
  Now i get this:
  
  1109 : Unknown table 'andrewd' in where clause
  
  andrewd being the username I am trying to get it to accept.
  
  Following lines are the current bit:
   $arg = select password, 1 as auth from acl where
   username='$username' and
  password=MD5($username.$password);
   $result = mysql_query( $arg ) or die(mysql_errno(). : .
   mysql_error() );
   $row = mysql_fetch_array($result);
  
  Andrew
  
  -Original Message-
  From: Miles Thompson [mailto:[EMAIL PROTECTED]]
  Sent: Friday, 11 January 2002 2:36 AM
  To: [EMAIL PROTECTED]
  Subject: RE: [PHP-DB] MySQL Result Resource
  
  
  Break up the code.
  
  I assume you are connecting to the database with mysql_connect()  or
  mysql_pconnect(). If not, do that.
  
  Echo your query so that you know it contains valid values.
  
  Break $row = mysql_fetch_array(mysql_db_query( DATABASE, $arg ));
  into
  $result = mysql_query( $arg ) or die(mysql_errno(). : .
 mysql_error() );
  $row = mysql_fetch_array($result) )
  then do whatever processing you need with the array $row.
  
  Miles
  
  PS Just reply to the list, if you reply directly to me I have one more
  message to delete. g /mt
  
  At 02:10 AM 1/11/2002 +1100, Necro wrote:
   Yeh, I notice now the MD5 was wrong.
   
   But I still get the same error on line 104. If I try and replace it
 with
  the
   current query function then I get two errors.
   
   e.g.
   Warning: Supplied argument is not a valid MySQL-Link resource in
   d:\htdocs\infekt\packages\auth.inc on line 104
   
   Warning: Supplied argument is not a valid MySQL result resource in
   d:\htdocs\infekt\packages\auth.inc on line 104
   
   Andrew
   
   
   -Original Message-
   From: Miles Thompson [mailto:[EMAIL PROTECTED]]
   Sent: Friday, 11 January 2002 2:05 AM
   To: Necro; [EMAIL PROTECTED]
   Subject: Re: [PHP-DB] MySQL Result Resource
   
   
   
   The use of the MD5 function in the query doesn't look quite right.
   Shouldn't it be MD5('$password')  or MD5('$username'.'$password') if
   concatenating?
   
   Also, mysql_db_query() has been a deprecated function for some time
 now,
   mysql_query() is recommended.
   
   Hope this gets you going - Miles Thompson
   
   At 01:33 AM 1/11/2002 +1100, Necro wrote:
Lo all,

Slight problem on an auth script...


Warning: Supplied argument is not a valid MySQL result resource in
d:\htdocs\infekt\packages\auth.inc on line 104


Line 26:  define( DATABASE, imanager );
Line 103: $arg = select password, 1 as auth from acl where
username='$username' and password=MD5('$username','$password');
Line 104: $row = mysql_fetch_array(mysql_db_query( DATABASE, $arg ));


Can anyone help get this to work??

Thankyou.

Andrew


--
 

Re: [PHP-DB] MySQL Result Resource

2002-01-10 Thread Andrey Hristov

try : 
$arg = select password, 1 as auth from acl where (username='andrewd') and 
password=MD5(concat(username,password));

HTH

Andrey
- Original Message - 
From: Necro [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 10, 2002 6:29 PM
Subject: RE: [PHP-DB] MySQL Result Resource


 Parse error: parse error in d:\htdocs\infekt\packages\auth.inc on line 104
 
 $arg = select password, 1 as auth from acl where (username='andrewd' and
 password=MD5(andrewd.madonna));
 
 Nope  :(
 
 
 
 -Original Message-
 From: Andrey Hristov [mailto:[EMAIL PROTECTED]]
 Sent: Friday, 11 January 2002 3:28 AM
 To: Necro
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] MySQL Result Resource
 
 
 try this :
 
 select password, 1 as auth from acl where (username='andrewd' and
 password=MD5(andrewd.madonna));
 - Original Message -
 From: Necro [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, January 10, 2002 6:18 PM
 Subject: RE: [PHP-DB] MySQL Result Resource
 
 
  Same error...
 
  select password, 1 as auth from acl where (username='andrewd' and
  password=MD5(andrewd.madonna))1109 : Unknown table 'andrewd' in where
 clause
 
  Andrew
 
  -Original Message-
  From: George Pitcher [mailto:[EMAIL PROTECTED]]
  Sent: Friday, 11 January 2002 3:10 AM
  To: Necro; [EMAIL PROTECTED]
  Subject: Re: [PHP-DB] MySQL Result Resource
 
 
  I was having something similar and solved it by wrapping the column names
 in
  parentheses:
 
  select password, 1 as auth from acl where (username='andrewd' and
   password=MD5(andrewd.madonna));
 
  It might help. or eliminate something if I'm not right.
 
  George
  - Original Message -
  From: Necro [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, January 10, 2002 4:09 PM
  Subject: RE: [PHP-DB] MySQL Result Resource
 
 
   Yep,
  
   andrewd is the username im trying to get this script to work with, its
 an
   authentication script..
  
   The result of echo $arg is the following:
  
   select password, 1 as auth from acl where username='andrewd' and
   password=MD5(andrewd.madonna)1109 : Unknown table 'andrewd' in where
  clause
  
   Andrew
  
   -Original Message-
   From: Miles Thompson [mailto:[EMAIL PROTECTED]]
   Sent: Friday, 11 January 2002 3:08 AM
   To: Necro; [EMAIL PROTECTED]
   Subject: RE: [PHP-DB] MySQL Result Resource
  
  
   Can you try this puppy at the MySQL console? I'd dearly love to know
 where
   andrewd is coming from, it sounds like your username.
  
   Before executing mysql_query(), echo $arg and see what it prints.
  
   This is strange, but better than what we had - Miles Thompson
  
   At 02:54 AM 1/11/2002 +1100, Necro wrote:
   Ok,
   I have tried a few things now. I finally got it to echo the errors,
  firstly
   there was still a prob with MD5 values being in the apostrophes.
   Then next error was no db was selected. So i added a mysql_select_db
   statement.
   Now i get this:
   
   1109 : Unknown table 'andrewd' in where clause
   
   andrewd being the username I am trying to get it to accept.
   
   Following lines are the current bit:
$arg = select password, 1 as auth from acl where
username='$username' and
   password=MD5($username.$password);
$result = mysql_query( $arg ) or die(mysql_errno(). : .
mysql_error() );
$row = mysql_fetch_array($result);
   
   Andrew
   
   -Original Message-
   From: Miles Thompson [mailto:[EMAIL PROTECTED]]
   Sent: Friday, 11 January 2002 2:36 AM
   To: [EMAIL PROTECTED]
   Subject: RE: [PHP-DB] MySQL Result Resource
   
   
   Break up the code.
   
   I assume you are connecting to the database with mysql_connect()  or
   mysql_pconnect(). If not, do that.
   
   Echo your query so that you know it contains valid values.
   
   Break $row = mysql_fetch_array(mysql_db_query( DATABASE, $arg ));
   into
   $result = mysql_query( $arg ) or die(mysql_errno(). : .
  mysql_error() );
   $row = mysql_fetch_array($result) )
   then do whatever processing you need with the array $row.
   
   Miles
   
   PS Just reply to the list, if you reply directly to me I have one more
   message to delete. g /mt
   
   At 02:10 AM 1/11/2002 +1100, Necro wrote:
Yeh, I notice now the MD5 was wrong.

But I still get the same error on line 104. If I try and replace it
  with
   the
current query function then I get two errors.

e.g.
Warning: Supplied argument is not a valid MySQL-Link resource in
d:\htdocs\infekt\packages\auth.inc on line 104

Warning: Supplied argument is not a valid MySQL result resource in
d:\htdocs\infekt\packages\auth.inc on line 104

Andrew


-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 January 2002 2:05 AM
To: Necro; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL Result Resource



The use of the MD5 function in the query doesn't look quite right

Re: [PHP-DB] mysql.so

2002-01-08 Thread Andrey Hristov

Old modules (compiled for php 4.0.x) are not binary compatible with 4.1.x series.
To compile oci8.so you need an oracle installation. More info on oracle from Thies 
Arntzen.
I'm not sure but
./configure --enable-mysql  make 
will produce the .so

Regards,
Andrey Hristov
- Original Message - 
From: Andrea Trasatti [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 08, 2002 6:30 PM
Subject: [PHP-DB] mysql.so


 Hello all,
 I'm trying to recompile PHP, I downloaded V4.1.1 and wanted to move from 
 my old 4.0.6 to it.
 
 I have a RH 6.2, btw. I had mysql.so, oci8.so and a couple more libraries. I think I 
 had downloaded them from rpmfind or similar site. How do I recompile them to work 
 with PHP 4.1?
 
 I tried building PHP --with-mysql as a configure option and mysql gets compiled 
 inside php, but I wanted it as a library.
 I am compiling php as a loadable module for apache, BTW, but I will be using it as a 
 CGI too.
 
 Thank you,
 Andrea
 
 =
 Andrea Trasatti
 Bware Technologies s.r.l.
 via San Gregorio, 3
 Tel. +39 02 2779181
 Fax  +39 02 27791828
 Cell +39 335 7866749
 WWW  http://www.bware.it
 =
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Formated Results

2002-01-07 Thread Andrey Hristov

Try printing pre before and /pre after them


Regards,
Andrey Hristov
- Original Message -
From: Barry Rumsey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 07, 2002 2:19 PM
Subject: [PHP-DB] Formated Results


Hi
I have a database that has lyrics in it. I can get them to list but they are not 
aligned the same as whats in the database. How can
I get the results aligned as whats in the database ?



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Potential for optimizing a huge table for querries?

2001-12-27 Thread Andrey Hristov

Mysql has support for indexes on two or more fields. So you can create index on 
country_code AND province.
At the moment I cannot remember the syntax but look at the docs www.mysql.com/doc/ to 
find it.


HTH

Regards,
Andrey Hristov

- Original Message - 
From: Andy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, December 27, 2001 12:57 PM
Subject: [PHP-DB] Potential for optimizing a huge table for querries?


 Hi guys,
 
 I would like to optimize a tabel with 2.3 mio entries for querries
 
 The table is not gonna be changed afterwards, no entries are gonna be added.
 It just supports info.
 
 currently it looks like that:
 
 ID: int(7)
 city: varchar(50)
 country_code char(2)
 province: char(2)
 
 indexes:
 country_code
 province
 
 Type: MyISAM
 
 Querry on country_code AND province
 
 Does anybody know if this has potential to optimize?
 
 Cheers Andy
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Change value in the table

2001-12-23 Thread Andrey Hristov

Try this:
UPDATE your_table SET your_field=
CONCAT(
  SUBSTR(str,0,INSTR(str,text_to_be_replaced)),
  your_replacement,
  SUBSTR(str, INSTR(str,text_to_be_replaced)+LEGNTH(text_to_be_replaced) )
)
WHERE your_field like '%text_to_be_replaced%';

May be there is a need for some changes

HTH

Regards,
Andrey Hristov

- Original Message - 
From: Nagasea [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, December 23, 2001 4:56 PM
Subject: [PHP-DB] Change value in the table


 I want to change all the text XXX to YYY in the posts_text table. 
 I know i can do that in the phpMyAdmin by running a queries. 
 Can someone let me know what should i write ?
 
 note : I want to change a single word (XXX) within the whole post test. 
 
 
 - 
 ID | POST | 
 - 
 1 | Happy XXX | 
 2 | Super XXX | 
 3 | Mouse XXX | 
 - 
 
 
 
 _
 www.kaskus.com - Community Forum  Free Email service
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re : alternate

2001-11-29 Thread Andrey Hristov


 can it be index_forum1 instead of index_forum. This code presumes that it's possible
 while($group = $db-fetch_array($queryg)) {
   if($group[type] == group) {
 $bg = 1- $bg;
 eval(\$forumlist .= \.template(index_category.($bg+1).\;);
 if($catsonly != on || $gid) {
   $query = $db-query(SELECT * FROM $table_forums WHERE type='forum' 
AND status='on' AND fup='$group[fid]' ORDER BY 
displayorder);
   while($forum = $db-fetch_array($query)) {
 $forumlist .= forum($forum, index_forum);
   }
 }
   }else {
 $forumlist .= forum($group, index_forum);
   }
 }
 Regards
 
 Andrey Hristov
 - Original Message - 
 From: MrBaseball34 [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, November 29, 2001 5:31 PM
 Subject: [PHP-DB] Alternating rows pulled from database
 
 
  I am trying to modify the XMB Forums to be more like
  UBB in looks.
  
  In this code, I want to alternate forum_index templates. 
  
  I have created two templates, one using $altbg1 and one using $altbg2. I want 
  to alternate the row colors... 
  
  How would I accomplish that? 
  {from: index.php} 
  
  code:
  while($group = $db-fetch_array($queryg)) {
if($group[type] == group) {
  eval(\$forumlist .= \.template(index_category).\;);
  if($catsonly != on || $gid) {
$query = $db-query(SELECT * FROM $table_forums WHERE type='forum' 
 AND status='on' AND fup='$group[fid]' ORDER BY 
 displayorder);
while($forum = $db-fetch_array($query)) {
  $forumlist .= forum($forum, index_forum);
}
  }
}else {
  $forumlist .= forum($group, index_forum);
}
  }
  
  
  What I really need to do is something like this:
  
$i = 0
while($forum = $db-fetch_array($query)) {
  if ($i % 2 = 0 {
$forumlist .= forum($forum, index_forum);
  } else {
$forumlist .= forum($forum, index_forum2);
  }
  $i = $i + 1;
}
  
  -- 
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
  
 
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Storing JPEG's in MySQL -- Is it possible?

2001-11-28 Thread Andrey Hristov

Try 
header('Content-type: image/gif');

Regards,
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS

- Original Message - 
From: PaulC [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 28, 2001 10:28 AM
Subject: Re: [PHP-DB] Storing JPEG's in MySQL -- Is it possible?


 I am using this to read the uploaded file
 
 $attach_data =
 addslashes(fread(fopen($HTTP_POST_FILES['attachment']['tmp_name'], r),
 filesize($HTTP_POST_FILES['attachment']['tmp_name'])));
 
 I'm then insterting that into the MySQL database, along with the
 $attachment_type
 
 It works fine for a GIF, but a JPEG isn't displayed correctly.
 
 Thanks,
 Paul
 
 
 Ck Raju [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Please show your script, so that we can answer you better.
  CK Raju
 
  On Tuesday 27 November 2001 16:37, PaulC wrote:
   Hi,
  
   I've wrote a bit of code to upload a file, and store it in a MySQL
   longblob field.
   If I upload a GIF, and store it in MySQL I am able to retrieve it fine
   using a PHP script.
  
   However, a JPEG uploads, but cannot be retrieved successfully.
   (I get a broken image symbol in IE)
  
   Does anybody know why this is???
  
   Thanks,
   Paul
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Storing JPEG's in MySQL -- Is it possible?

2001-11-28 Thread Andrey Hristov

excuses,
image/jpeg
- Original Message - 
From: PaulC [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 28, 2001 10:28 AM
Subject: Re: [PHP-DB] Storing JPEG's in MySQL -- Is it possible?


 I am using this to read the uploaded file
 
 $attach_data =
 addslashes(fread(fopen($HTTP_POST_FILES['attachment']['tmp_name'], r),
 filesize($HTTP_POST_FILES['attachment']['tmp_name'])));
 
 I'm then insterting that into the MySQL database, along with the
 $attachment_type
 
 It works fine for a GIF, but a JPEG isn't displayed correctly.
 
 Thanks,
 Paul
 
 
 Ck Raju [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Please show your script, so that we can answer you better.
  CK Raju
 
  On Tuesday 27 November 2001 16:37, PaulC wrote:
   Hi,
  
   I've wrote a bit of code to upload a file, and store it in a MySQL
   longblob field.
   If I upload a GIF, and store it in MySQL I am able to retrieve it fine
   using a PHP script.
  
   However, a JPEG uploads, but cannot be retrieved successfully.
   (I get a broken image symbol in IE)
  
   Does anybody know why this is???
  
   Thanks,
   Paul
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] JOIN Very SLOW...

2001-11-28 Thread Andrey Hristov

You use LEFT JOIN so your query is optimized. Probably your tables are big, you don't 
have many MB of RAM. When you have big RAM, I
think that tables reside in memory and join of 5 tables every 600,000 rows is done 
for 4-5s. May be you have to increase some of
the buffers sizes of mysql.

Regards,
Andrey Hristov
- Original Message -
From: Martin E. Koss [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 28, 2001 12:09 PM
Subject: [PHP-DB] JOIN Very SLOW...


 The following does work but it extremely slow.

 $phselect = select COUNT(*) AS phTotal from properties LEFT JOIN
 propertydetails ON properties.PropertyID=propertydetails.PropertyID where
 ((propertydetails.Image1Desc='') AND
 (properties.PropertyType='$PropertyType'));

 $phresult = mysql_query ($phselect,$conID);
 while ($phrow = mysql_fetch_array($phresult)) {
 $phTotal = $phrow[phTotal];
 PRINT td align=\right\$phTotal/td\n;
 } // end WHILE

 Is there an obvious problem here and can anyone help?

 Martin E. Koss
 M: 07946-706459
 E: [EMAIL PROTECTED]


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] query + loop problem

2001-11-28 Thread Andrey Hristov

echo table\r\n;
while($row = mysql_fetch_assoc($result)) {  // if assoc is not available - will work 
but double results
foreach($row as $key = $value){
echo trtd$key/tdtd$value/td/tr\r\n;
} 
}//end loop
echo /table\r\n;

HTH
Regards,
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS

- Original Message - 
From: Russ Michell [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 28, 2001 5:36 PM
Subject: [PHP-DB] query + loop problem


 Hi there everyone:
 
 I have a generic query containing variables, substituted for values dependant upon 
specific 
 circumstances:
 
 file://query the DB on the basis of searches employing text input fields (LIKE)
 if($sql_clause == 'LIKE') {
 $sql = SELECT * FROM $table WHERE $field $sql_clause '%$query%';
 }
 file://query the DB on the basis of searches employing select menus ('=')
 else if($sql_clause == '=') {
 $sql = SELECT * FROM $table WHERE $field $sql_clause '$query';
 }
 $result = mysql_query($sql,$connect) or printerror(Query Failure!,06);
 $numrows = mysql_num_rows($result);
 
 
 Instead of the usual 'hard-coded' method within the loop as below:
 
 file://loop using hard-coded variables
 while($row = mysql_fetch_array($result)) {
 $field1 = $row[fieldname1];
 $field2 = $row[fieldname2]; file://etc
 }//end while loop
 
 I'd like to be able to have this dynamically enabled as below:
 
 file://loop using relevant field names to display correct page content
 while($row = mysql_fetch_array($result)) {
 
 file://generic method of extracting rownames according to '$table' (above) goes 
here
 
 }//end loop
 
 Does anyone have a clue how to do this???
 
 Many Thanks!
 Russ
 
 
 #---#
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] gzip image files

2001-11-27 Thread Andrey Hristov

Yes, it is.
the return value of fopen is a resource of type file.
var_dump($data); will show that
if you want to read the data use : fread($data,$buf);

but I think its better with file() function. The example from the docs show a better 
method:
?php
$data = implode(, bigfile.txt);
$gzdata = gzencode($data, 9);
$fp = fopen(bigfile.txt.gz, w);
fwrite($fp, $gzdata);
fclose($fp);
?

Regards,
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS


- Original Message - 
From: Keith Whyman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 27, 2001 4:23 PM
Subject: [PHP-DB] gzip image files


 I create a png dynamically - store the path in mysql.
 
 And want to be able to offer the user a zipped version to download
 Unfortunately haven't been able to get it to work up until now !
 I'm sure it's something obvious but...
 
 
 Open the png
 $data = fopen('kunden/'.$name.'.png', rb);
 encode it
 $gzdata = gzencode($data);
 where to write
 $fp = fopen('kunden/zip/'.$name.'.gz', w);
 write it
 fwrite($fp, $gzdata);
 fclose($fp);
 
 what happens is the name gets included in the gz but written to it is only
 kunden/example.png
 
 Can anyone help ??
 
 thanks in advance
 regards
 keith
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] gzip image files

2001-11-27 Thread Andrey Hristov

Of course it will
$filename = 'kunden/'.$name.'.png';
$data = fopen($filename, r);
$contents = fread($data, filesize($filename));
fclose($data);
// ok so far so good
$gzdata = gzencode($data);
// here is the error, instead of $data use $contents 
$fp = fopen('kunden/zip/'.$name.'.gz', w);
fwrite($fp, $gzdata);
fclose($fp);
// this is ok

Regards,
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS


- Original Message - 
From: Keith Whyman [EMAIL PROTECTED]
To: Andrey Hristov [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, November 27, 2001 5:06 PM
Subject: Re: [PHP-DB] gzip image files


 and if i use
 
 $filename = 'kunden/'.$name.'.png';
 $data = fopen($filename, r);
 $contents = fread($data, filesize($filename));
 fclose($data);
 $gzdata = gzencode($data);
 $fp = fopen('kunden/zip/'.$name.'.gz', w);
 fwrite($fp, $gzdata);
 fclose($fp);
 
 it writes in the gz file this
 Resource id #3
 
 
 
  Yes, it is.
  the return value of fopen is a resource of type file.
  var_dump($data); will show that
  if you want to read the data use : fread($data,$buf);
 
  but I think its better with file() function. The example from the docs
 show a better method:
  ?php
  $data = implode(, bigfile.txt);
  $gzdata = gzencode($data, 9);
  $fp = fopen(bigfile.txt.gz, w);
  fwrite($fp, $gzdata);
  fclose($fp);
  ?
 
  Regards,
  Andrey Hristov
  IcyGEN Corporation
  http://www.icygen.com
  BALANCED SOLUTIONS
 
 
  - Original Message -
  From: Keith Whyman [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, November 27, 2001 4:23 PM
  Subject: [PHP-DB] gzip image files
 
 
   I create a png dynamically - store the path in mysql.
  
   And want to be able to offer the user a zipped version to download
   Unfortunately haven't been able to get it to work up until now !
   I'm sure it's something obvious but...
  
  
   Open the png
   $data = fopen('kunden/'.$name.'.png', rb);
   encode it
   $gzdata = gzencode($data);
   where to write
   $fp = fopen('kunden/zip/'.$name.'.gz', w);
   write it
   fwrite($fp, $gzdata);
   fclose($fp);
  
   what happens is the name gets included in the gz but written to it is
 only
   kunden/example.png
  
   Can anyone help ??
  
   thanks in advance
   regards
   keith
  
  
   --
   PHP Database Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
  
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] [PHP] Coding methods (was RE: [PHP-DB] gzip image files)

2001-11-27 Thread Andrey Hristov

When you use  the parser scans the string for variables. When ' is used it is not 
parsed. So you know what $variable to put,
concatenate the strings with the variable(s). I think it's a faster method. IMO, yes 
it seems ugly, but I want to be faster not so
readable as a novel.

Regards,
Andrey Hristov

- Original Message -
From: Boget, Chris [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, November 27, 2001 5:28 PM
Subject: [PHP] Coding methods (was RE: [PHP-DB] gzip image files)


  $filename = 'kunden/'.$name.'.png';

 I see this all the time and I'm curious:  what takes more
 computing power (granted, either would be incredibly little
 I'm sure, just curious which requires more work by PHP)?

 this:

 $filename = this  . $varname .  that;

 or this:

 $filename = this $varname that;

 I would think the latter example but am not sure.

 Another question, but this is more about personal style:

 I almost always use the latter method in my coding practices.  It
 looks cleaner and, IMO, is easier to follow especially when there
 are a number of variables involved.  For those that use the former
 method, why do you?  I'm not trying to be judgemental, just curious
 why people do what they do.  In asking, I may actually learn some-
 thing. :p

 Chris




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] gzip image files

2001-11-27 Thread Andrey Hristov

This writes 'png' at the end of file so the file will be corrupted for every 
compressor. If you want to name is foo.bar.gz.png
then:

$fp = fopen('kunden/zip/'.substr($name,0,-4).'.gz'.'.png', w+);
not sure but the substr() have to remove .png from the filename.

Regards,
Andrey

- Original Message - 
From: Keith Whyman [EMAIL PROTECTED]
To: Andrey Hristov [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, November 27, 2001 5:30 PM
Subject: Re: [PHP-DB] gzip image files



 ha it works !
 thanks !
 now just one last question :-))
 how can i name my png in the gz file so that it ends with .png ?
 i thought this would work
 fwrite($fp, $gzdata.'.png');
 but it doesn't ! :-(
 
 
 
  Of course it will
  $filename = 'kunden/'.$name.'.png';
  $data = fopen($filename, r);
  $contents = fread($data, filesize($filename));
  fclose($data);
  // ok so far so good
  $gzdata = gzencode($data);
  // here is the error, instead of $data use $contents
  $fp = fopen('kunden/zip/'.$name.'.gz', w);
  fwrite($fp, $gzdata);
  fclose($fp);
  // this is ok
 
  Regards,
  Andrey Hristov
  IcyGEN Corporation
  http://www.icygen.com
  BALANCED SOLUTIONS
 
 
  - Original Message -
  From: Keith Whyman [EMAIL PROTECTED]
  To: Andrey Hristov [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Tuesday, November 27, 2001 5:06 PM
  Subject: Re: [PHP-DB] gzip image files
 
 
   and if i use
  
   $filename = 'kunden/'.$name.'.png';
   $data = fopen($filename, r);
   $contents = fread($data, filesize($filename));
   fclose($data);
   $gzdata = gzencode($data);
   $fp = fopen('kunden/zip/'.$name.'.gz', w);
   fwrite($fp, $gzdata);
   fclose($fp);
  
   it writes in the gz file this
   Resource id #3
  
  
  
Yes, it is.
the return value of fopen is a resource of type file.
var_dump($data); will show that
if you want to read the data use : fread($data,$buf);
   
but I think its better with file() function. The example from the docs
   show a better method:
?php
$data = implode(, bigfile.txt);
$gzdata = gzencode($data, 9);
$fp = fopen(bigfile.txt.gz, w);
fwrite($fp, $gzdata);
fclose($fp);
?
   
Regards,
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS
   
   
- Original Message -
From: Keith Whyman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 27, 2001 4:23 PM
Subject: [PHP-DB] gzip image files
   
   
 I create a png dynamically - store the path in mysql.

 And want to be able to offer the user a zipped version to download
 Unfortunately haven't been able to get it to work up until now !
 I'm sure it's something obvious but...


 Open the png
 $data = fopen('kunden/'.$name.'.png', rb);
 encode it
 $gzdata = gzencode($data);
 where to write
 $fp = fopen('kunden/zip/'.$name.'.gz', w);
 write it
 fwrite($fp, $gzdata);
 fclose($fp);

 what happens is the name gets included in the gz but written to it
 is
   only
 kunden/example.png

 Can anyone help ??

 thanks in advance
 regards
 keith


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]


   
   
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
   
  
  
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Query help

2001-11-16 Thread Andrey Hristov

SELECT count(f.room),WEEK(MAX(b.date),1), WEEK(MIN(b.date),1) FROM freero
oms f, booking b;

will be
SELECT count(f.room),WEEK(MAX(b.date),1), WEEK(MIN(b.date),1) FROM freero
oms f LEFT JOIN booking USING(room) b;

room is the field which connects two tables. If it has different name change it in 
USING
Other problems?
Write..

Regards,

Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS

- Original Message - 
From: Matt Williams [EMAIL PROTECTED]
To: Php-Db@Lists. Php. [EMAIL PROTECTED]
Sent: Friday, November 16, 2001 5:20 PM
Subject: [PHP-DB] Query help


 Not really this list but I'm after a quick bit of help.
 If I run this query
 
 select count(room) from freerooms;
 -83
 
 and this
 
 SELECT WEEK(MAX(date),1), WEEK(MIN(date),1)as totalweeks FROM booking;
 -48 40
 
 All good so far
 now if I run this
 
 SELECT count(f.room),WEEK(MAX(b.date),1), WEEK(MIN(b.date),1) FROM freero
 oms f, booking b;
 -+---+-+-+
 | count(f.room) | WEEK(MAX(b.date),1) | WEEK(MIN(b.date),1) |
 +---+-+-+
 | 24817 |  48 |  40 |
 +---+-+-+
 
 It seems to be mulitplying out for some reason but I'm stuck as to how/why
 and how to resolve it.
 
 TIA
 
 M:
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Query help

2001-11-16 Thread Andrey Hristov

Ooops

SELECT count(f.room),WEEK(MAX(b.date),1), WEEK(MIN(b.date),1) FROM freerooms as f LEFT 
JOIN booking AS b USING(room);

Apolgizes

- Original Message - 
From: Andrey Hristov [EMAIL PROTECTED]
To: Matt Williams [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, November 16, 2001 5:32 PM
Subject: Re: [PHP-DB] Query help


 SELECT count(f.room),WEEK(MAX(b.date),1), WEEK(MIN(b.date),1) FROM freero
 oms f, booking b;
 
 will be
 SELECT count(f.room),WEEK(MAX(b.date),1), WEEK(MIN(b.date),1) FROM freero
 oms f LEFT JOIN booking USING(room) b;
 
 room is the field which connects two tables. If it has different name change it in 
USING
 Other problems?
 Write..
 
 Regards,
 
 Andrey Hristov
 IcyGEN Corporation
 http://www.icygen.com
 BALANCED SOLUTIONS
 
 - Original Message - 
 From: Matt Williams [EMAIL PROTECTED]
 To: Php-Db@Lists. Php. [EMAIL PROTECTED]
 Sent: Friday, November 16, 2001 5:20 PM
 Subject: [PHP-DB] Query help
 
 
  Not really this list but I'm after a quick bit of help.
  If I run this query
  
  select count(room) from freerooms;
  -83
  
  and this
  
  SELECT WEEK(MAX(date),1), WEEK(MIN(date),1)as totalweeks FROM booking;
  -48 40
  
  All good so far
  now if I run this
  
  SELECT count(f.room),WEEK(MAX(b.date),1), WEEK(MIN(b.date),1) FROM freero
  oms f, booking b;
  -+---+-+-+
  | count(f.room) | WEEK(MAX(b.date),1) | WEEK(MIN(b.date),1) |
  +---+-+-+
  | 24817 |  48 |  40 |
  +---+-+-+
  
  It seems to be mulitplying out for some reason but I'm stuck as to how/why
  and how to resolve it.
  
  TIA
  
  M:
  
  
  -- 
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
  
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Next

2001-11-14 Thread Andrey Hristov

Use sessions. (session_start() and session_register()), and at the start of the test 
save row_ids(question_ids) in arrray which you
make with session_register a session variable. On other pages you do session_start() 
and after that you have access to the array.

Regards,
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS



- Original Message -
From: Peter Allum [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 14, 2001 11:37 AM
Subject: [PHP-DB] Next


 I am writing a questionaire, am gonna include java timer etc... and it is
 written in PHP 4 and Mysql running on Apache.

 I have my questionaire database full of questions I randomly select say 40
 questions. But rather than display the whole array on the screen I would
 like to have 1 question per page and a next button. I hope that makes sense
 any ideas anyone?

 Many thanks for you halp in advance.

 Peter

 --
 Regards,




 Peter Allum
 Connect U Ltd
 
 **
 Confidentiality: This email and its attachments are intended for the above
 name only and may be confidential. If they have come to you in error you
 must take no action based upon them, nor must you copy or show them to
 anyone.
 Please reply to this email and highlight the error.
 Security Warning: Please note that this email has been created in the
 knowledge that Internet email is not a 100% secure medium.
 We advise that you understand and observe this lack of security when
 emailing us.
 Viruses: Although we have taken steps to ensure that this email and
 attachments are free from any virus, we advise that in keeping with good
 computing practice the recipient should ensure they are actually virus free.
 [EMAIL PROTECTED]
 
 **



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] TREE in a database

2001-10-29 Thread Andrey Hristov

The OASIS project for ad-server uses hierchical system for the sections 
stored in Mysql.
the simplest structure is a  row with 3 fields(node_id - autoincrement, 
parent_id int, data - sometype). the root has parent_id NULL or 0(because 
autoincrements usually starts from 1, but this is subject to change by user).
I think that this makes clear how to implement the tree.

Have fun.


-- 
Andrey Hristov
Web Developer
Icygen Corporation
BUILDING SOLUTIONS
http://www.icygen.com

On Monday 29 October 2001 03:02 pm, you wrote:
 Is there an easy way to implement tree structure in a database.
 Something like file systems do for files.

 Hints, links, anything.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Embedding Perl

2001-10-24 Thread Andrey Hristov

: There is a solution but I don't know how good is it?
I'm not sure but the name of the project is PHPerl or something about it.


-- 
Andrey Hristov
Web Developer
Icygen Corporation
BUILDING SOLUTIONS
http://www.icygen.com

On Wednesday 24 October 2001 12:05 pm, you wrote:
 I have a small situation where it would be good to be able to embed a
 perl routing in a php script. Is this possible? Or do I need to pass
 control from php to a perl script and return?

 A quick synopsis would be (in pseudo code)

 ?php
   if($theFileType == pdf {
   // call convert.pl to get a thumbnail
   }
   else {
   // other file type processing
   }
 ?


 Alternatively, is there a module that can take a pdf file and make a
 thumbnail of the first page?


 Thanks,
 Terry


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Re: Html email

2001-10-24 Thread Andrey Hristov

H, try not to set your encoding to base64. I think that Outlooks works 
find and decodes the base64 stream but this stream is a normal text, so with 
this in header you make obfuscating. You pass fox jumps over a lazy dog and 
Outlook thinks that is base64, so it decodes to blablaba

-- 
Andrey Hristov
Web Developer
Icygen Corporation
BUILDING SOLUTIONS
http://www.icygen.com


-=-=-=--==--==--=-=-=-=-=-=-=-=-=-==--=-=-=-=-==--=-=
Hello-
    I've always had this type of mail statement work for me:

mail($to, $Subject, $Body, From: $From\r\nContent-Type: text/html;
charset=iso-8859-1);

My guess is that Outlook doesnt know what to do with the header you're
sending it (maybe too much info for outlook??)...
Other than that I've got no idea =)


--
Jason Wood
Chief Technology Officer
Expressive Tek, Inc.
407 Kehrs Mill Road
Ballwin, MO 63011
Phone 636.256.1362
www.expressivetek.com



Benny [EMAIL PROTECTED] wrote in message
001501c15c1d$7f2f5560$0b01a8c0@ISKAT">news:001501c15c1d$7f2f5560$0b01a8c0@ISKAT...

 Please help me. I have problem with html email. I send email to 3 email
 address : [EMAIL PROTECTED], [EMAIL PROTECTED] and [EMAIL PROTECTED]

 The email client for yahoo  eudoramail is their web. And for the last
 destination, the email client is ms outlook.

 The html email for yahoo  eudoramail are well received. But for the
 last destination the ms outlook display the wrong result like encrypted
 text. Below is my code and the result in ms outlook.

 My code :

 $s_to = '[EMAIL PROTECTED]';
 $s_subject = 'Subject xxx';
 $s_headers = From: [EMAIL PROTECTED]\r\n;
 $s_headers .= MIME-Version: 1.0\r\n;
 $s_boundary = uniqid(id);
 $s_headers .= Content-Type: multipart/alternative .
    ; boundary = $s_boundary\r\n\r\n;
 $s_headers .= This is a MIME encoded message.\r\n\r\n;

 $s_headers .= --$s_boundary\r\n .
 $s_headers .=   Content-Type: text/html; charset=\iso-8859-1\\r\n .
    Content-Transfer-Encoding: base64\r\n\r\n;

 $s_headers2 = chunk_split(base64_encode(bla...bbla.../bbla...));
 $s_headers = $s_headers.$s_headers2.'--'.$s_boundary.'--';
 @mail ($s_to, $s_subject,, $s_headers);



 Result in ms outlook :

 Return-Path: [EMAIL PROTECTED]
 Delivered-To: [EMAIL PROTECTED]
 Received: (qmail 2773 invoked by uid 252); 22 Oct 2001 23:35:00 -
 Date: 22 Oct 2001 23:35:00 -
 Message-ID: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Subject xxx
 From: [EMAIL PROTECTED]
 MIME-Version: 1.0
 Content-Type: multipart/alternative; boundary = id3bd4ad2486465 This is
 a MIME encoded message.


 --id3bd4ad2486465
 Content-Type: text/html; charset=iso-8859-1
 Content-Transfer-Encoding: base64


 PGZvbnQgZmFjZT0iVmVyZGEhlbHZldGljYSwgc2Fucy1zZXJpZiIgc2l6ZT0i

 aXY+PC9mb250C90cj48L3RhYmxlPg==

 --id3bd4ad2486465--


 Regards;

 Benny.





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] How to write errorhandling??

2001-10-22 Thread Andrey Hristov

That's correct. I've seen a discussion on dev phorum about embeding SMTP code 
in PHP, but as I remember the final decision was that SMTP code will stay 
outside of PHP code.



-- 
Andrey Hristov
Web Developer
Icygen Corporation
BUILDING SOLUTIONS
http://www.icygen.com

On Monday 22 October 2001 06:46 am, you wrote:
 Hi,
 I see that everybody is looking for the error in the header function - but
 the error actually is that Luditus is trying to use mail on a Windows box
 with no SMTP server on it.
 It is possible to suppress the mail function output using @mail, but it
 won't fix the problem - if you want to use mail function on a WIN machine
 you'll need a sendmail like program and you will have to adjust the
 sendmail_path variable in your PHP configuration.

 HTH
 Dobromir Velev

 -Original Message-
 From: Luditus [EMAIL PROTECTED]
 To: [EMAIL PROTECTED] [EMAIL PROTECTED]
 Date: Sunday, October 21, 2001 1:41 PM
 Subject: [PHP-DB] How to write errorhandling??

 Hi Fokes,
 
 I would like to send an mail via the mail function.
 
 If the mail failes I would like to redirect to an errorpage. Currently my
 code looks like this:
 
  if ( mail($email,$subject_confirm_account, $message_confirm_account,
 $from_confirm_account) ){
   HEADER(Location:index.php?fuseaction=txtmsg=registered);

 file://success

  }
  else{
   HEADER(Location:index.php?fuseaction=txtmsg=mailproblem); // mail

 could

 not been sent
  };
 
 Unfortunatelly I get an erromessage like that:
 
 Warning: Failed to Connect in
 e:\projects\globosapiens\07_production\actual\account\include\user.php on
 line 256
 
 Warning: Cannot add header information - headers already sent by (output
 started at
 e:\projects\globosapiens\07_production\actual\account\include\user.php:256
 ) in
  e:\projects\globosapiens\07_production\actual\account\include\user.php

 on

 line 260
 
 Where is the problem??? I can't see it.
 
 Maybe one of you guys could help me out.
 
 Thanx in advance,
 
 Luditus
 
 
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] reading arrays within a field from mysql and separating the values

2001-09-11 Thread Andrey Hristov

$my_arr= array(.);
echo implode(' ',array_keys($my_arr));

Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS


- Original Message - 
From: Rick Emery [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 11, 2001 4:23 PM
Subject: RE: [PHP-DB] reading arrays within a field from mysql and separating the 
values


 the explode() should have worked on that.  Something like:
 
 $query = SELECT DCD_Access FROM userdb WHERE ID = $user_ID;
 $result4 = mysql_query($query) or die(Error);
 $DCD = mysql_fetch_array($result4);
 $myarray = explode( ,, $DCD['DCD_Access'] );
 foreach ( $myarray as $val )
   {
 print option value='$val'$val/option\n;
   }
 
 -Original Message-
 From: Robert Trembath [mailto:[EMAIL PROTECTED]]
 Sent: Monday, September 10, 2001 4:45 PM
 To: Rick Emery
 Subject: Re: [PHP-DB] reading arrays within a field from mysql and
 separating the values
 
 
 NASA, BBCI
 
 I want to separate these but I either get what I show above as a single
 value or the word Array depending on how I try to get to the values.
 
 
 - Original Message -
 From: Rick Emery [EMAIL PROTECTED]
 Newsgroups: php.db
 To: [EMAIL PROTECTED]
 Sent: Monday, September 10, 2001 4:27 PM
 Subject: RE: [PHP-DB] reading arrays within a field from mysql and
 separating the values
 
 
  Robert,
 
  Do a manual SELECT DCD_Access FROM userdb WHERE ID = ### 
  and send the results.  I'd like to see exactly what is in that field.  The
  explode() should have provided an array of values
 
  rick
 
  -Original Message-
  From: Robert Trembath [mailto:[EMAIL PROTECTED]]
  Sent: Monday, September 10, 2001 3:53 PM
  To: Rick Emery
  Subject: Re: [PHP-DB] reading arrays within a field from mysql and
  separating the values
 
 
  The same as my original message.
 
  - Original Message -
  From: Rick Emery [EMAIL PROTECTED]
  Newsgroups: php.db
  To: [EMAIL PROTECTED]
  Sent: Monday, September 10, 2001 3:40 PM
  Subject: RE: [PHP-DB] reading arrays within a field from mysql and
  separating the values
 
 
   what do you mean by it made no difference?  Did you examine each element
  in
   $myarray?  What were the results?
  
   rick
  
   FYI...I tried to send directly to you and the message was bounced back
   -Original Message-
   From: Robert Trembath [mailto:[EMAIL PROTECTED]]
   Sent: Monday, September 10, 2001 3:30 PM
   To: Rick Emery
   Subject: Re: [PHP-DB] reading arrays within a field from mysql and
   separating the values
  
  
   Rick,
   I tried it and it made no difference. Could you give me a more complete
   example?
   Thanks for the help.
   Robert
   - Original Message -
   From: Rick Emery [EMAIL PROTECTED]
   To: 'Robert Trembath' [EMAIL PROTECTED]; [EMAIL PROTECTED]
   Sent: Monday, September 10, 2001 3:03 PM
   Subject: RE: [PHP-DB] reading arrays within a field from mysql and
   separating the values
  
  
$myarray=explode(,,$DCD['DCD_Access']);
   
Then, cycle through each $myarray element as you've done below.
   
-Original Message-
From: Robert Trembath [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 10, 2001 2:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] reading arrays within a field from mysql and
separating the values
   
   
Hello everyone,
   
Ran into a problem trying to get this to work. I have multiple names
 in
  a
mysql field (DCD_Access) that contains name1, name2, name3, name4
 and
  I
want read this information as an array so I can use these values to
   populate
a pull-down list using a while or foreach loop. Below is the code I
  used,
but I get the values as a single entry no matter what I try. This
 query
brings a single result row name1, name2, name3, name4. Here's the
  code:
   
$result4 = mysql_query( SELECT DCD_Access FROM userdb WHERE ID =
'$user_ID');
$DCD = mysql_fetch_array ( $result4 );
   
print  td width='6%' valign=top\n
div align='center'\n
select name='LCompare'\n
option value='none'None/option\n
option value='within'Within Gel/option\n;
foreach ( $DCD as $val )
{
print option value='$val'$val/option\n;
}
print/select/div\n
  /td\n;
   
This returns HTML like:
   
td width='6%' valign=top
div align='center'
select name='LCompare'
option value='none'None/option
option value='within'Within Gel/option
option value='name1, name2, name3, name4'name1, name2,
   name3,
name4/option
option value='name1, name2, name3, name4'name1, name2,
   name3,
name4/option
option value='name1, name2, name3, name4'name1, name2,
   name3,
name4/option
option value='name1, name2, name3, name4'name1, name2,
   name3,
name4/option
 /select

Re: [PHP-DB] access my cgi-bin

2001-09-11 Thread Andrey Hristov

I'm not sure that this will work. I think that c:/apache/htdocs is visible to web, so 
../cgi-bin/ will return to
http://host/cgi-bin/test.php .hmmm this will work because there is mapping ScriptAlias 
/cgi-bin/ to /apache/cgi-bin/ but this is not
clear it is effect. better action=/cgi-bin/test.php

Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS


- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: 'its me' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, September 11, 2001 4:25 PM
Subject: RE: [PHP-DB] access my cgi-bin


 yeah, that should have worked.

 FORM method=post action =../cgi-bin/test.php 

 -Original Message-
 From: its me [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 11, 2001 3:19 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] access my cgi-bin


 here is my folders tree:
 (i'm on windows)
 c:/apache/cgi-bin/test.php
 c:/apache/htdocs/click.html

 i want to call test.php from click.html.
 what is the syntax?
 is it something like:  ../cgi-bin/test.php?



 
 

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] reading arrays within a field from mysql and separating the values

2001-09-11 Thread Andrey Hristov

, ok, sorry for the disturbance. greets.

Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS


- Original Message - 
From: Rick Emery [EMAIL PROTECTED]
To: 'Andrey Hristov' [EMAIL PROTECTED]; Rick Emery [EMAIL PROTECTED]
Sent: Tuesday, September 11, 2001 4:39 PM
Subject: RE: [PHP-DB] reading arrays within a field from mysql and separating the 
values


 yes, is corrrect concerning implode(), which constructs a string from an
 array.  He already has string, such as name1,name2,name3,name4.  What he
 wants is:
  $array[0] = name1
  $array[1] = name2
  $array[2] = name3
  $array[3] = name4
 
  $array = explode(,, name1,name2,name3,name4 ) performs this
 function
 
 -Original Message-
 From: Andrey Hristov [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 11, 2001 8:32 AM
 To: Rick Emery
 Subject: Re: [PHP-DB] reading arrays within a field from mysql and
 separating the values
 
 
 so implode(' ') separates the values with space. i use implode() many
 times when using files. $content =
 implode('',file('file_name'));
 
 Andrey Hristov
 IcyGEN Corporation
 http://www.icygen.com
 BALANCED SOLUTIONS
 
 
 - Original Message -
 From: Rick Emery [EMAIL PROTECTED]
 To: 'Andrey Hristov' [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Tuesday, September 11, 2001 4:30 PM
 Subject: RE: [PHP-DB] reading arrays within a field from mysql and
 separating the values
 
 
  Andrey,
 
  He wants to separate values from an array, not combine them into an array.
 
  -Original Message-
  From: Andrey Hristov [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, September 11, 2001 8:26 AM
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP-DB] reading arrays within a field from mysql and
  separating the values
 
 
  $my_arr= array(.);
  echo implode(' ',array_keys($my_arr));
 
  Andrey Hristov
  IcyGEN Corporation
  http://www.icygen.com
  BALANCED SOLUTIONS
 
 
  - Original Message -
  From: Rick Emery [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, September 11, 2001 4:23 PM
  Subject: RE: [PHP-DB] reading arrays within a field from mysql and
  separating the values
 
 
   the explode() should have worked on that.  Something like:
  
   $query = SELECT DCD_Access FROM userdb WHERE ID = $user_ID;
   $result4 = mysql_query($query) or die(Error);
   $DCD = mysql_fetch_array($result4);
   $myarray = explode( ,, $DCD['DCD_Access'] );
   foreach ( $myarray as $val )
 {
   print option value='$val'$val/option\n;
 }
  
   -Original Message-
   From: Robert Trembath [mailto:[EMAIL PROTECTED]]
   Sent: Monday, September 10, 2001 4:45 PM
   To: Rick Emery
   Subject: Re: [PHP-DB] reading arrays within a field from mysql and
   separating the values
  
  
   NASA, BBCI
  
   I want to separate these but I either get what I show above as a single
   value or the word Array depending on how I try to get to the values.
  
  
   - Original Message -
   From: Rick Emery [EMAIL PROTECTED]
   Newsgroups: php.db
   To: [EMAIL PROTECTED]
   Sent: Monday, September 10, 2001 4:27 PM
   Subject: RE: [PHP-DB] reading arrays within a field from mysql and
   separating the values
  
  
Robert,
   
Do a manual SELECT DCD_Access FROM userdb WHERE ID = ### 
and send the results.  I'd like to see exactly what is in that field.
  The
explode() should have provided an array of values
   
rick
   
-Original Message-
From: Robert Trembath [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 10, 2001 3:53 PM
To: Rick Emery
Subject: Re: [PHP-DB] reading arrays within a field from mysql and
separating the values
   
   
The same as my original message.
   
- Original Message -
From: Rick Emery [EMAIL PROTECTED]
Newsgroups: php.db
To: [EMAIL PROTECTED]
Sent: Monday, September 10, 2001 3:40 PM
Subject: RE: [PHP-DB] reading arrays within a field from mysql and
separating the values
   
   
 what do you mean by it made no difference?  Did you examine each
  element
in
 $myarray?  What were the results?

 rick

 FYI...I tried to send directly to you and the message was bounced
 back
 -Original Message-
 From: Robert Trembath [mailto:[EMAIL PROTECTED]]
 Sent: Monday, September 10, 2001 3:30 PM
 To: Rick Emery
 Subject: Re: [PHP-DB] reading arrays within a field from mysql and
 separating the values


 Rick,
 I tried it and it made no difference. Could you give me a more
  complete
 example?
 Thanks for the help.
 Robert
 - Original Message -
 From: Rick Emery [EMAIL PROTECTED]
 To: 'Robert Trembath' [EMAIL PROTECTED];
  [EMAIL PROTECTED]
 Sent: Monday, September 10, 2001 3:03 PM
 Subject: RE: [PHP-DB] reading arrays within a field from mysql and
 separating the values


  $myarray=explode(,,$DCD['DCD_Access']);
 
  Then, cycle through each

Re: [PHP-DB] PHP and ms Access

2001-08-31 Thread Andrey Hristov

I think that by using ODBC you can connect to the MS Access server.


Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS


- Original Message - 
From: user [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 31, 2001 4:33 PM
Subject: [PHP-DB] PHP and ms Access


 Hello,
 
 I am builing a microsoft access database.
 
 Now wants the compagny I created it for me to use it to make dynamic
 webpages. The problem is that I am new at this.
 
 Can somebody please explain the basics of integrating a MS Access databse
 with php into a webpage?
 
 I thank you in advance,
 
 TheB'Oss
 
 file://Could you please mail the answer to [EMAIL PROTECTED]
 
 Thx
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Couldn't get all data using the mysql_fetch_array function, Pls Help!!!!

2001-08-29 Thread Andrey Hristov

 while ($row= mysql_fetch_array($result,MYSQL_ASSOC))
 {
foreach ($row as $value){
 print ($value |);
}
 }
- Original Message - 
From: Jack [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 29, 2001 6:16 PM
Subject: [PHP-DB] Couldn't get all data using the mysql_fetch_array function, Pls 
Help


 Dear all
 I was trying to fetch all the data from one of my table leaverequest, but
 i couldn't fetch all the data if i use the * .
 here is my program, this one is only fetch the Reason field, but what i want
 is all the data.
 
 ?
 $dblink=mysql_pconnect(microsoft,console,edshk);
 mysql_select_db(nedcorhk,$dblink);
 $query = select * from leaverequest;
 $result=mysql_query($query,$dblink);
 
 while ($row= mysql_fetch_array($result,MYSQL_ASSOC))
 {
 print ({$row[Reason]});
 }
 ?
 
 But can i do it like that way to get all the data? (Showing below) :
 
 ?
 $dblink=mysql_pconnect(microsoft,console,edshk);
 mysql_select_db(nedcorhk,$dblink);
 $query = select * from leaverequest;
 $result=mysql_query($query,$dblink);
 
 while ($row= mysql_fetch_array($result,MYSQL_ASSOC))
 {
 print ({$row[*]});
 }
 ?
 
 
 Pls help me!!
 
 Thx
 jack
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 
 
 
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Special character on an INSERT statement

2001-08-28 Thread Andrey Hristov

Use addslashes() when inserting/updating the DB
use stripslashes() when extracting.

Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
99%

- Original Message -
From: Jorge Giménez Mayorgas [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 28, 2001 7:48 PM
Subject: [PHP-DB] Special character on an INSERT statement


Hi .

I'm trying to do this on an INSERT statement.

$sql= INSERT  (' TONS OF CD'S ')
or any phrase with the character ' .
Obviously it gives an error when execeting mysql_query.

How can I do it ?

Thanks,

Jorge Giménez




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Getting SQL queries from existing DB

2001-08-27 Thread Andrey Hristov

Get and install phpMyAdmin. It can dump to you, the stucture, the data or both. Then 
save them from the browser(better with lynx
because you can get the source of a page piped). And pipe it to another mysql, or 
use it in another phpMyAdmin.

Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
99%

- Original Message -
From: Adriana Matiaskova [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, August 26, 2001 12:39 PM
Subject: [PHP-DB] Getting SQL queries from existing DB


 Does anyone have some scripts/program for creating SQL queries from existing MySQL 
database? I mean, it will create queries like
CREATE TALBES... to be able to make Database with the same structure. Thanks.


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] DISTINCT in SQL query

2001-08-27 Thread Andrey Hristov

Try with
SELECT distinct title,filelocation,filename,ranking,summary
FROM pdf LEFT JOIN searchwords USING(id) LEFT JOIN words USING(id)
WHERE LCASE(words.word) LIKE LCASE('%$searchstr%') ORDER BY ranking DESC;

Have in mind that all text fields in MySQL except with added clause BINARY, or BLOBs 
ARE CASE_INSENSITIVE
It is better to JOIN your tables with LEFT JOIN, or RIGHT JOIN but don't expect that 
MySQL will optimize your query well when you do
this kind of cartesian join. Try with 4 tables everyone with 200,000 rows and you will 
see the diff. May be without LEFT(RIGHT) JOIN
your mysqld will fork too much.

Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
99%

- Original Message -
From: Scott Mebberson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 27, 2001 9:33 AM
Subject: [PHP-DB] DISTINCT in SQL query


 Hi Guys,

 I am retriving information based across three tables, here is the SQL
 statement

 SELECT DISTINCT title, filelocation, filename, ranking, summary FROM pdf,
 words, searchwords WHERE words.id = searchwords.word_id AND pdf.id =
 searchwords.pdf_id AND LCASE(words.word) LIKE LCASE('%$searchstr%') ORDER BY
 ranking DESC;

 The only problem is, the return set has duplicated rows. But I think I may
 have a problem in the words table. I am indexing pdf files and they each
 have upto 15 search words, but some of the rows in the words table aren't
 words, but instead three or four words, ie.

 script (this is a word in one row)
 server script (these words are in the second row)

 So the query is picking up script in both cases due to the %% in the LIKE
 clause, is there anyway to remove the duplicate rows or do I have to have
 only one word in each row in the words table?

 Hope this makes sense... let me know if it doesn't and I'll re-write it ;)\

 Thanks

 Scott.




 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] br appear in Text file

2001-08-27 Thread Andrey Hristov

See:
1)strip_tags
2)fgetss
3)preg_replace('|(.*?)(.*?)(/.*?)|','\2',$string);

Example:
?php
$string=a href=''alabala/a;
$string=preg_replace('|(.*?)(.*?)(/.*?)|','\2',$string);
echo htmlspecialchars($string);
?
Produces :
alabala

Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
99%

- Original Message - 
From: Jack [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, August 27, 2001 11:21 AM
Subject: [PHP-DB] br appear in Text file


 Dear all
 I'm writing a script which will greb the data from a user input form into a
 text file (txt file), but the problem is that when the data had passed to
 the txt file, there will be some thing like the br and black square appear
 inside the file. This is affecting to display the data from that txt file to
 the text box in (input box).
 Is there anyway that i can do to avoid grebing the br from txt file to my
 input box's value? or anyway that i can delete the br when the data is
 greb from input box to txt file??
 
 Thanks a lot
 
 Jack
 [EMAIL PROTECTED]
 
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Getting SQL queries from existing DB

2001-08-27 Thread Andrey Hristov

phpMyAdmin can do this also. Can dump the data and structure to SQL Statements. The 
problem appears if the table for dumping is
100,000 rows or something bigger than the computer can get and start swapping.

Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
99%

- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: 'Andrey Hristov' [EMAIL PROTECTED]; Adriana Matiaskova [EMAIL PROTECTED]; 
[EMAIL PROTECTED]
Sent: Monday, August 27, 2001 5:29 PM
Subject: RE: [PHP-DB] Getting SQL queries from existing DB


 Use mysqldump utility (see MySQL manual, section 14.5)

shell mysqldump [OPTIONS] database [tables]
ORmysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
ORmysqldump [OPTIONS] --all-databases [OPTIONS]


 -Original Message-
 From: Andrey Hristov [mailto:[EMAIL PROTECTED]]
 Sent: Monday, August 27, 2001 1:40 AM
 To: Adriana Matiaskova; [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] Getting SQL queries from existing DB


 Get and install phpMyAdmin. It can dump to you, the stucture, the data or
 both. Then save them from the browser(better with lynx
 because you can get the source of a page piped). And pipe it to another
 mysql, or use it in another phpMyAdmin.

 Andrey Hristov
 IcyGEN Corporation
 http://www.icygen.com
 99%

 - Original Message -
 From: Adriana Matiaskova [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, August 26, 2001 12:39 PM
 Subject: [PHP-DB] Getting SQL queries from existing DB


  Does anyone have some scripts/program for creating SQL queries from
 existing MySQL database? I mean, it will create queries like
 CREATE TALBES... to be able to make Database with the same structure.
 Thanks.
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] variable if statement

2001-08-23 Thread Andrey Hristov

$func_body = return ($a==1 or $b==2);

$newfunc = create_function('$a,$b',$func_body);
if ($newfunc($first_par,$second_par)){

}

or 
if ($newfunc($a,$b,return (\$a==1 or \$b==2);)){

}
or

if ($newfunc($a,$b,'return (\$a==1 or \$b==2);')){

}

Hope this will help.

Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
99%


- Original Message - 
From: Brian Weisenthal [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 23, 2001 8:14 PM
Subject: [PHP-DB] variable if statement


 i want to do something like this:
 
 $string=($a==1) OR ($b==2);
 
 if ($string) { do something ; }
 
 any ideas? i tried using if (eval($string)) but that just gave me errors.
 
 thanks
 
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] variable if statement

2001-08-23 Thread Andrey Hristov

?
$a=1;
$flag = 0;
$test = (a==1) OR (b==1);
$string = if($test){ $flag =1;};
var_dump($string);
eval($string);
if( $flag ==1 ) {var_dump($a);}
?
Produces:
string(28) if((a==1) OR (b==1)){ 0 =1;}
Parse error: parse error in c:/apache/htdocs/test2.php(7) : eval()'d code on
line 1

Why?
Because of using  instead of '', or if use  the escape the $
Also there is another problem:
$test = (a==1) OR (b==1);
must be
$test = (\$a==1) OR (\$b==1);
if  it was
$test = ($a==1) OR ($b==1);
then there will be a substitution. As a side effect this will work because
if $a=1
then $test=(1==1) or (what_is_b==1)
which given to eval() will work.


Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
99%

- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 23, 2001 8:27 PM
Subject: RE: [PHP-DB] variable if statement


 eval will work, but the entire thing must be in the eval().  It would look
 like:

 $flag = 0;
 $test = (a==1) OR (b==1);
 $string = if($test){ $flag =1;};
 eval($string);
 if( $flag ==1 ) {do_something;}

 I had to resort to this in a similar situation.  I read the condition and
 result action in a MySQL database.

 Richard Emery
 Excel Communications, Inc.
 IT Sr. Project Manager
 (972) 478-3398
 (972) 944-0542 (pager)

 There is no trying...
 There is only Do or Not Do



 -Original Message-
 From: Brian Weisenthal [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, August 23, 2001 12:15 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] variable if statement


 i want to do something like this:

 $string=($a==1) OR ($b==2);

 if ($string) { do something ; }

 any ideas? i tried using if (eval($string)) but that just gave me errors.

 thanks




 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Oracle performance

2001-08-22 Thread Andrey Hristov

 Can someone tell me where I can find already done benchmarks of Oracle
compared to other RDBMSes like DB2, MySQL,PostgreSQL or how many connection
will get oracle8i on a machine with 512 or 1024MB RAM, dual CPU PIII 500 or
dual PIII 1.1Ghz.

Sincerely : Andrey Hristov
IcyGEN Corporation
http://www.icygen.com

P.S.
Thanks to Thies.C.Arntzen for the reference of OCI2 slides on conf.php.net
Also thanks to Graeme Merrall for the time spent writing an explanation.
Thank you guys.




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] how should i test my php program performance?

2001-08-22 Thread Andrey Hristov

?php

$starttime=explode(' ',microtime());
// code is here
//
//
$endtime=explode(' ',microtime());
$starttime=$starttime[1]+$starttime[0];
$endtime=$endtime[1]+$endtime[0];
$parse_time=$endtime-$starttime;

?
Try apache benchmarking tool to view what is the peak of executions per
second.
I don't use linux but think that the name of the executable is 'ab'

Andrey Hristov

http://www.icygen.com
99%

- Original Message -
From: haheho [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 22, 2001 6:23 PM
Subject: [PHP-DB] how should i test my php program performance?


 Dear all:

 I have wrote a php program and use mysql database.
 Is there a way to test its performance?
 Thanks.

 haheho



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Oracle Oci*Logon

2001-08-21 Thread Andrey Hristov

 Can someone tell more about OciPLogon.
I know that OciLogon is used frequently but the connection to the DB is
shared amongst the pages so as in the common way where every page in a site
uses one pair user/password use the only channel. When one script makes
commit it commits all, so if two scripts subsequently made insert but one
thinks that there was a fail it will issue rollback. The problem is that
the other script issued commit and rollback does nothing.
Someone can tell that the decision is using OciNLogon - ok but I know that
this is the most time consuming way to connect to Oracle.
The refined question is: Does OciPlogon is like OciLogon - one channel, one
scripts commits/rollbacks all statements, or it is like OciNLogon but the
connection is not made everytime a scripts want such but used already
created one?.
One more question : When PHP and Oracle works on one machine to make all
work the enviroment variable ORACLE_HOME has to be set for example :
/***/

// set ORACLE Dir to get the NET8 name resolver working
// tnsnames.ora has to be in $ORACLE_HOME/networking/admin/
putenv(ORACLE_HOME=/home/oracle01/app/oracle/product/8.1.5);


/***/

but if my web server is an Apache under windows and the oracle is on other
machine under Linux(RH), what have to be done to make my PHP work with the
DB.

Many thanks.
Sincerely : Andrey Hristov


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]