[PHP-DB] NT4+APACHE+PHP+DB2

2001-03-07 Thread Charles Brown

I want to connect to db2 use ODBC,But get a error:SQLSTATE 57017,means a
diffrent codepage setting,my db2's codepage=437,But how can i set codepage
in php?or in apache?



-- 
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] (Newbie) how to evaluate a varying number of db generated checkboxes?

2001-03-07 Thread jester

I'm generating a html form with php and a MySQL database.
My code generates a varying number of checkboxes depending on the number of
'options' in my database. The name of the checkbox is set to the -id- of the
'option' in my database. When the generated form is posted I want to show a
page showing a overview of the 'options' checked. But how do I check if that
varying number of checkboxes is 'checked' ??


db connect and query, result of query is placed in: $result .

while($row=mysql_fetch_array($result))
{
print("form method=\"post\" action=\"formhandler.php\"");
$optionID=$row["id"];
$optionDescription=$row["description"];
print("input type=\"checkbox\" name=\"$optionID\"
$optionDescriptionbr\n");
print("/form");
}


But how can I get this 'unknown' number of checkboxes in my next page and
evaluate if they are checked so I can leave out the unchecked ones in my
overview.




Who can help me with this problem?!

Thanx!
H. de Visser



-- 
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] ODBC test cases

2001-03-07 Thread Dan Kalowsky

Hi,

I've been working on some of the bugs for ODBC in the bugs db, mainly
those dealing with Windows and ODBC. 

One of the common bugs seems to be using odbc_prepare() and
odbc_execute() in conjuction with each other.  I was hoping someone
might be able to do an ODBC test case for me, on something other than
Microsoft Access (which is all I have MS wise).  

Two tables should be created, odbcetest1 and odbctest2.  Any writes in
this script to odbctest1 should fail, but I believe odbctest2 should
work fine.  If anyone can send me some results confirming or denying my
theory, they would be appriciated.  :)



? 

//
// this is just a quick and dirty proof of concept script
//

//
// please setup this script to connect to your database
//
$conn = odbc_connect("phptest","","");
if (!$conn)
{
print "Error in connectingBR\n";
exit;
}

odbc_exec($conn,"DROP TABLE odbctest1"); 
odbc_exec($conn,"CREATE TABLE odbctest1 (id INT, firstname CHAR(24),
lastname CHAR(24))");
odbc_exec($conn,"DROP TABLE odbctest2"); 
odbc_exec($conn,"CREATE TABLE odbctest2 (id CHAR(2), firstname CHAR(24),
lastname CHAR(24))");
odbc_exec($conn,"INSERT INTO odbctest1 (id,firstname,lastname) VALUES
(0,'Zend','PHP')");
odbc_exec($conn,"INSERT INTO odbctest2 (id,firstname,lastname) VALUES
('99','Apache','Origami')");

$stmt1 = odbc_prepare($conn,"INSERT INTO odbctest1
(id,firstname,lastname) VALUES (?,?,?)");
if ($stmt1) {
print "Trying execute stat1br";
$stmt1 = odbc_execute($stmt1,array(1,"This","Fails"));
}

$stmt2 = odbc_prepare($conn,"INSERT INTO odbctest2
(id,firstname,lastname) VALUES (?,?,?)");
if ($stmt2) {
print "Trying execute stat2br";
$stmt1 = odbc_execute($stmt1,array("1","This","Works"));
}

?


-- 
Dan Kalowsky  "Tonight I think I'll walk alone, 
Worldgate Communications   I'll find my soul as I go home."
Software Engineer - TICS Group  - Temptation
[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] ODBC test cases: CORRECTED

2001-03-07 Thread Dan Kalowsky

Made an error in the first script (forgot to update one field)... find
the correction below...
---
Hi,

I've been working on some of the bugs for ODBC in the bugs db, mainly
those dealing with Windows and ODBC. 

One of the common bugs seems to be using odbc_prepare() and
odbc_execute() in conjuction with each other.  I was hoping someone
might be able to do an ODBC test case for me, on something other than
Microsoft Access (which is all I have MS wise).  

Two tables should be created, odbcetest1 and odbctest2.  Any writes in
this script to odbctest1 should fail, but I believe odbctest2 should
work fine.  If anyone can send me some results confirming or denying my
theory, they would be appriciated.  :)



? 

//
// this is just a quick and dirty proof of concept script
//

//
// please setup this script to connect to your database
//
$conn = odbc_connect("phptest","","");
if (!$conn)
{
print "Error in connectingBR\n";
exit;
}

odbc_exec($conn,"DROP TABLE odbctest1"); 
odbc_exec($conn,"CREATE TABLE odbctest1 (id INT, firstname CHAR(24),
lastname CHAR(24))");
odbc_exec($conn,"DROP TABLE odbctest2"); 
odbc_exec($conn,"CREATE TABLE odbctest2 (id CHAR(2), firstname CHAR(24),
lastname CHAR(24))");
odbc_exec($conn,"INSERT INTO odbctest1 (id,firstname,lastname) VALUES
(0,'Zend','PHP')");
odbc_exec($conn,"INSERT INTO odbctest2 (id,firstname,lastname) VALUES
('99','Apache','Origami')");

$stmt1 = odbc_prepare($conn,"INSERT INTO odbctest1
(id,firstname,lastname) VALUES (?,?,?)");
if ($stmt1) {
print "Trying execute stat1br";
$stmt1 = odbc_execute($stmt1,array(1,"This","Fails"));
}

$stmt2 = odbc_prepare($conn,"INSERT INTO odbctest2
(id,firstname,lastname) VALUES (?,?,?)");
if ($stmt2) {
print "Trying execute stat2br";
$stmt2 = odbc_execute($stmt2,array("1","This","Works"));
}

?


-- 
Dan Kalowsky  "Tonight I think I'll walk alone, 
Worldgate Communications   I'll find my soul as I go home."
Software Engineer - TICS Group  - Temptation
[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] mail server

2001-03-07 Thread Free Beachler

hi all,
 is there any way i can specify my own smtp server and override the
php.ini file?  i want to use
the mail command on my host and i keep getting this error:

Warning: Unknown error in
D:\inetpub\nextepmedia\www\nexteplaunch\test_email.php on line 2



i just have a simple php file with a mail command to mail to me, something
like:

mail('[EMAIL PROTECTED]', 'test email', 'line1\nline2\line3');



anyway, i'm on this NT host and they're not that good.  instead of having
them go into their php.ini file and see what's wrong i want to set my own
server (in the script) to point to our host's SMTP server.

-f



-- 
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] mail function

2001-03-07 Thread Liz Bander

I need to make an email link in a table.  The username is displayed as 
text; I need it to be a link through which I can send email.  Is this 
possible in php?  The following is the code for that I'm using:

function show_logged_users($user) {

   $query = "select distinct uid, cn from log left join ldap.ldap on 
log.user like ldap.ldap.uid order by ldap.ldap.sn";

   connect();
   $result = mysql_query($query);

   if (($result)  (mysql_num_rows($result)  0)) {
 while ($line = mysql_fetch_row($result)) {
   $opts[$line[0]] = $line[1];
 }
   } else {
 $opts[0] = "Error in show_logged_users()";
   }

   show_select($opts, $user);
}

   td
 font face="Arial, Helvetica, sans-serif" size="-1" 
color="#FF"bUser/b/font
   /td
   td
 select name="user"
 ? show_logged_users($user) ?
 /select
   /td


What I need is the ? show_logged_users($user) ? statement to turn itself 
into a mailto: statement to that clicking on the user name will bring up an 
email addressed to username @domain.com  Is this possible?  Is there any 
code out there that I can get a look at?

Thanks,

Liz


-- 
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] mail server

2001-03-07 Thread Michael J. Upchurch

The function ini.set() should be the one to use, but it doesn't set all
options for security reasons.  See
http://www.php.net/manual/en/function.ini-set.php for details.  You should
also check the annotations for email functions for other options.

Michael J. Upchurch
Partner2Partner Communications, LLC

-Original Message-
From: Free Beachler [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 07, 2001 11:48 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] mail server


hi all,
 is there any way i can specify my own smtp server and override the
php.ini file?  i want to use
the mail command on my host and i keep getting this error:

Warning: Unknown error in
D:\inetpub\nextepmedia\www\nexteplaunch\test_email.php on line 2



i just have a simple php file with a mail command to mail to me, something
like:

mail('[EMAIL PROTECTED]', 'test email', 'line1\nline2\line3');



anyway, i'm on this NT host and they're not that good.  instead of having
them go into their php.ini file and see what's wrong i want to set my own
server (in the script) to point to our host's SMTP server.

-f



--
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] Problem with rule

2001-03-07 Thread Olivier Thauvin


I have a problem with rule on a postgresql 7.0.3:

When I do
create rule truc as on insert to table do
insert into othertable (value) values (new.clef);

where clef is my primary key as serial, it jump one entry in the sequence table and my 
insert on the other table dosen't put the correct values.

But when I insert old.key, the value is the older, the not increment sequence.

Do you know if it is a bug, or what I'm doing wrong ? 



-- 
Olivier Thauvin-CNRS Service Aeronomie
[EMAIL PROTECTED] 
Téléphone:
01 64 47 43 60 à Verrières (lundi,mercredi et vendredi)
01 44 27 47 59 à Jussieu (Mardi et Jeudi)



-- 
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] (Newbie) how to evaluate a varying number of db generated checkboxes?

2001-03-07 Thread JJeffman

If you have a way to decide which checkboxes have to be checked, just set
its attribute like the line bellow:
INPUT TYPE="checkbox" NAME="" ?PHP if($condition) echo("CHECKED");? 

HTH

Jayme.

-Mensagem Original-
De: jester [EMAIL PROTECTED]
Para: [EMAIL PROTECTED]
Enviada em: quarta-feira, 7 de maro de 2001 14:00
Assunto: [PHP-DB] (Newbie) how to evaluate a varying number of db generated
checkboxes?


 I'm generating a html form with php and a MySQL database.
 My code generates a varying number of checkboxes depending on the number
of
 'options' in my database. The name of the checkbox is set to the -id- of
the
 'option' in my database. When the generated form is posted I want to show
a
 page showing a overview of the 'options' checked. But how do I check if
that
 varying number of checkboxes is 'checked' ??


 db connect and query, result of query is placed in: $result .

 while($row=mysql_fetch_array($result))
 {
 print("form method=\"post\" action=\"formhandler.php\"");
 $optionID=$row["id"];
 $optionDescription=$row["description"];
 print("input type=\"checkbox\" name=\"$optionID\"
 $optionDescriptionbr\n");
 print("/form");
 }


 But how can I get this 'unknown' number of checkboxes in my next page and
 evaluate if they are checked so I can leave out the unchecked ones in my
 overview.




 Who can help me with this problem?!

 Thanx!
 H. de Visser



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

2001-03-07 Thread Richard S. Crawford

Ah!  My bad!  I sent this question out with the wrong subject line.  My 
apologies to everyone that I confused.


At 01:07 PM 3/7/01 -0800, Richard S. Crawford wrote:


I desperately need to know whether it is possible to call an Oracle 
function in PHP.  For example...

$functionResult=hubins($name,$commit_yn)

where hubins is a stored procedure in our Oracle database.

Can this be done?  My first thought was to do something like this:

$functionCall="hubins($name,$commit_yen)";

then then do

ociexecute($functionCall);

...but that, of course didn't work.

Any thoughts?


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


--
http://www.mossroot.com/index.php
AIM Handle: Buffalo2K
e-mail: [EMAIL PROTECTED]
"When you lose the power to laugh at yourself, you lose the power to think 
straight."  --Clarence Darrow


-- 
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] mail server

2001-03-07 Thread JJeffman

I'm not sure but I think you must have a smtp server program running to
configure as your smtp server.

HTH.

Jayme.


-Mensagem Original-
De: Free Beachler [EMAIL PROTECTED]
Para: [EMAIL PROTECTED]
Enviada em: quarta-feira, 7 de maro de 2001 14:48
Assunto: [PHP-DB] mail server


 hi all,
  is there any way i can specify my own smtp server and override the
 php.ini file?  i want to use
 the mail command on my host and i keep getting this error:

 Warning: Unknown error in
 D:\inetpub\nextepmedia\www\nexteplaunch\test_email.php on line 2

 

 i just have a simple php file with a mail command to mail to me, something
 like:

 mail('[EMAIL PROTECTED]', 'test email', 'line1\nline2\line3');

 

 anyway, i'm on this NT host and they're not that good.  instead of having
 them go into their php.ini file and see what's wrong i want to set my own
 server (in the script) to point to our host's SMTP server.

 -f



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




AW: [PHP-DB] Oracle Function Calls

2001-03-07 Thread Matthias Kopolt

YOu have to form proper SQL-Statements

try to parse and execute:

select foo_function ('paramstr', 999) from dual;

dual is a dummy table;

then fetch the resultrow and  ociresult($stmt, 1) will return your
functionreturnvalue


mk

-Ursprungliche Nachricht-
Von: Richard S. Crawford [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 7. Marz 2001 22:11
An: [EMAIL PROTECTED]
Betreff: [PHP-DB] Oracle Function Calls


Ah!  My bad!  I sent this question out with the wrong subject line.  My
apologies to everyone that I confused.


At 01:07 PM 3/7/01 -0800, Richard S. Crawford wrote:


I desperately need to know whether it is possible to call an Oracle
function in PHP.  For example...

$functionResult=hubins($name,$commit_yn)

where hubins is a stored procedure in our Oracle database.

Can this be done?  My first thought was to do something like this:

$functionCall="hubins($name,$commit_yen)";

then then do

ociexecute($functionCall);

...but that, of course didn't work.

Any thoughts?


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


--
http://www.mossroot.com/index.php
AIM Handle: Buffalo2K
e-mail: [EMAIL PROTECTED]
"When you lose the power to laugh at yourself, you lose the power to think
straight."  --Clarence Darrow


--
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: AW: [PHP-DB] Oracle Function Calls

2001-03-07 Thread Richard S. Crawford

Here is the error that I get when I try this approach:

ORA-14551: cannot perform a DML operation inside a query



At 10:26 PM 3/7/01 +0100, Matthias Kopolt wrote:
YOu have to form proper SQL-Statements

try to parse and execute:

 select foo_function ('paramstr', 999) from dual;

dual is a dummy table;

then fetch the resultrow and  ociresult($stmt, 1) will return your
functionreturnvalue


mk

-Ursprungliche Nachricht-
Von: Richard S. Crawford [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 7. Marz 2001 22:11
An: [EMAIL PROTECTED]
Betreff: [PHP-DB] Oracle Function Calls


Ah!  My bad!  I sent this question out with the wrong subject line.  My
apologies to everyone that I confused.


At 01:07 PM 3/7/01 -0800, Richard S. Crawford wrote:


 I desperately need to know whether it is possible to call an Oracle
 function in PHP.  For example...
 
 $functionResult=hubins($name,$commit_yn)
 
 where hubins is a stored procedure in our Oracle database.
 
 Can this be done?  My first thought was to do something like this:
 
 $functionCall="hubins($name,$commit_yen)";
 
 then then do
 
 ociexecute($functionCall);
 
 ...but that, of course didn't work.
 
 Any thoughts?
 
 
 --
 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]
 

--
http://www.mossroot.com/index.php
AIM Handle: Buffalo2K
e-mail: [EMAIL PROTECTED]
"When you lose the power to laugh at yourself, you lose the power to think
straight."  --Clarence Darrow


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

--
http://www.mossroot.com/index.php
AIM Handle: Buffalo2K
e-mail: [EMAIL PROTECTED]
"When you lose the power to laugh at yourself, you lose the power to think 
straight."  --Clarence Darrow


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




AW: AW: [PHP-DB] Oracle Function Calls

2001-03-07 Thread Matthias Kopolt

Oracle Divides Function in several Groups

DML means Data-Manipulating function;

(in your funciton is a update or insert)

to use a function in a query it needs to be "pure" only selects and
arithmetics

you can rewrite this function to a procedure and return your value as an out
parameter

$stmt = ociparse($dbh,"BEGIN p_foo_procedure('param_in',:1);END;" );
OCIBindByName   ($stmt,":1",$outparam,40);
ociexecute  ($stmt);
OCIfreestatement($stmt);

40 is the buffer in chars/bytes (addjust if needed)

the procedure needs to declare the second argument as in and can declare the
second one as "out" or "in out"

mk

-Ursprungliche Nachricht-
Von: Richard S. Crawford [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 7. Marz 2001 22:46
An: [EMAIL PROTECTED]
Betreff: Re: AW: [PHP-DB] Oracle Function Calls


Here is the error that I get when I try this approach:

ORA-14551: cannot perform a DML operation inside a query



At 10:26 PM 3/7/01 +0100, Matthias Kopolt wrote:
YOu have to form proper SQL-Statements

try to parse and execute:

 select foo_function ('paramstr', 999) from dual;

dual is a dummy table;

then fetch the resultrow and  ociresult($stmt, 1) will return your
functionreturnvalue


mk

-Ursprungliche Nachricht-
Von: Richard S. Crawford [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 7. Marz 2001 22:11
An: [EMAIL PROTECTED]
Betreff: [PHP-DB] Oracle Function Calls


Ah!  My bad!  I sent this question out with the wrong subject line.  My
apologies to everyone that I confused.


At 01:07 PM 3/7/01 -0800, Richard S. Crawford wrote:


 I desperately need to know whether it is possible to call an Oracle
 function in PHP.  For example...
 
 $functionResult=hubins($name,$commit_yn)
 
 where hubins is a stored procedure in our Oracle database.
 
 Can this be done?  My first thought was to do something like this:
 
 $functionCall="hubins($name,$commit_yen)";
 
 then then do
 
 ociexecute($functionCall);
 
 ...but that, of course didn't work.
 
 Any thoughts?
 
 
 --
 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]
 

--
http://www.mossroot.com/index.php
AIM Handle: Buffalo2K
e-mail: [EMAIL PROTECTED]
"When you lose the power to laugh at yourself, you lose the power to think
straight."  --Clarence Darrow


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

--
http://www.mossroot.com/index.php
AIM Handle: Buffalo2K
e-mail: [EMAIL PROTECTED]
"When you lose the power to laugh at yourself, you lose the power to think
straight."  --Clarence Darrow


--
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: AW: AW: [PHP-DB] Oracle Function Calls

2001-03-07 Thread Richard S. Crawford

Hm.  Assuming that I don't have the option of rewriting the function to a 
procedure, is there another way to go?


At 10:54 PM 3/7/01 +0100, Matthias Kopolt wrote:
Oracle Divides Function in several Groups

DML means Data-Manipulating function;

(in your funciton is a update or insert)

to use a function in a query it needs to be "pure" only selects and
arithmetics

you can rewrite this function to a procedure and return your value as an out
parameter

 $stmt = ociparse($dbh,"BEGIN p_foo_procedure('param_in',:1);END;" );
 OCIBindByName   ($stmt,":1",$outparam,40);
 ociexecute  ($stmt);
 OCIfreestatement($stmt);

40 is the buffer in chars/bytes (addjust if needed)

the procedure needs to declare the second argument as in and can declare the
second one as "out" or "in out"

mk

--
http://www.mossroot.com/index.php
AIM Handle: Buffalo2K
e-mail: [EMAIL PROTECTED]
"When you lose the power to laugh at yourself, you lose the power to think 
straight."  --Clarence Darrow


-- 
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] parsing parameter over page 2

2001-03-07 Thread andrie

Hello All,
   thank for your attention
   i've tried to serialize my class variable and it seem to be
   work ( i print it out using echo $a;)
   but when i do unserialize to that class nothing happen, and
   still i can use my class ?
   is there something wrong ?

   any one can write a simple tutorial or example to do
   serializing/unserializing class
   over page..

   TIA

   

Wassalam,
andrie

Wednesday, March 07, 2001, 12:11:30 AM, Loe nulis gini:

HJ Try this URL from the PHP manual:

HJ http://www.php.net/manual/en/function.serialize.php

HJ You could use serialize($a) on your a.php page and then to use that object,
HJ you would do unserialize($b).  I think that's what you want to do.

HJ Josh Hoover
HJ KnowledgeStorm, Inc.



-- 
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] mail server

2001-03-07 Thread Miles Thompson

Paul Schreiber has written, in PHP, an email class. His opening comments 
are given below, but ii doesn't do what you want. He might be worth 
emailing however.

If you were on a Linux/Unix/etc box you could use exim, as it can be 
configured to be either it's own SMTP mailer or to use the ISP's. Aren't 
there any open source mail programs for NT?

I don't think this would be very fast, but Python has an SMTP module which 
is very easy to use, but then you'd be invoking Python and calling a script 
every time you wanted to send something. Not an optimum solution.

Miles Thompson




//   EmailClass 0.5
//   class for sending mail
//
//   Paul Schreiber
//   [EMAIL PROTECTED]
//   http://paulschreiber.com/
//
//   parameters
//   --
//   - subject, message, senderName, senderEmail and toList are required
//   - ccList, bccList and replyTo are optional
//   - toList, ccList and bccList can be strings or arrays of strings
// (those strings should be valid email addresses
//
//   example
//   ---
//   $m = new email ( "hello there",// subject
//"how are you?",   // message body
//"paul",   // sender's name
//"[EMAIL PROTECTED]", // sender's email
//array("[EMAIL PROTECTED]", "[EMAIL PROTECTED]"), // To: 
recipients
//"[EMAIL PROTECTED]"  // Cc: recipient
//   );
//
//   print "mail sent, result was" . $m-send();



At 06:17 PM 3/7/01 -0300, JJeffman wrote:
I'm not sure but I think you must have a smtp server program running to
configure as your smtp server.

HTH.

Jayme.


-Mensagem Original-
De: Free Beachler [EMAIL PROTECTED]
Para: [EMAIL PROTECTED]
Enviada em: quarta-feira, 7 de maro de 2001 14:48
Assunto: [PHP-DB] mail server


  hi all,
   is there any way i can specify my own smtp server and override the
  php.ini file?  i want to use
  the mail command on my host and i keep getting this error:
 
  Warning: Unknown error in
  D:\inetpub\nextepmedia\www\nexteplaunch\test_email.php on line 2
 
  
 
  i just have a simple php file with a mail command to mail to me, something
  like:
 
  mail('[EMAIL PROTECTED]', 'test email', 'line1\nline2\line3');
 
  
 
  anyway, i'm on this NT host and they're not that good.  instead of having
  them go into their php.ini file and see what's wrong i want to set my own
  server (in the script) to point to our host's SMTP server.
 
  -f
 
 
 
  --
  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] Oracle Function Calls

2001-03-07 Thread Joe Brown

this chunk of code comes out of
http://www.php.net/manual/en/function.ocinewcursor.php

?php
// suppose your stored procedure info.output returns a ref cursor in :data

$conn = OCILogon("scott","tiger");
$curs = OCINewCursor($conn);
$stmt = OCIParse($conn,"begin info.output(:data); end;");

ocibindbyname($stmt,"data",$curs,-1,OCI_B_CURSOR);
ociexecute($stmt);
ociexecute($curs);

while (OCIFetchInto($curs,$data)) {
var_dump($data);
}

OCIFreeCursor($stmt);
OCIFreeStatement($curs);
OCILogoff($conn);
?

Hope that helps, I havn't gone there (yet).

""Richard S. Crawford"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Ah!  My bad!  I sent this question out with the wrong subject line.  My
 apologies to everyone that I confused.


 At 01:07 PM 3/7/01 -0800, Richard S. Crawford wrote:


 I desperately need to know whether it is possible to call an Oracle
 function in PHP.  For example...
 
 $functionResult=hubins($name,$commit_yn)
 
 where hubins is a stored procedure in our Oracle database.
 
 Can this be done?  My first thought was to do something like this:
 
 $functionCall="hubins($name,$commit_yen)";
 
 then then do
 
 ociexecute($functionCall);
 
 ...but that, of course didn't work.
 
 Any thoughts?
 
 
 --
 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]
 

 --
 http://www.mossroot.com/index.php
 AIM Handle: Buffalo2K
 e-mail: [EMAIL PROTECTED]
 "When you lose the power to laugh at yourself, you lose the power to think
 straight."  --Clarence Darrow


 --
 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] Query times

2001-03-07 Thread Norman Tan

How do I get the query times echoed like this?

http://www.ub2k.com/alpha/UltraBoard.php

Thanks 
-- 
Norman Tan
North Shore Interactive
http://www.nsmb.com

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

2001-03-07 Thread Emre YILMAZ

if you are using phpmyadmin just click your database (its listed at the left
column) then at the right side select "structure and data" which is located
under "View dump(schema) of database" part, then select send and then click
"go"
you ll be asked for the path of your backup sql file. thats it. :)


""Pankaj Ahuja"" [EMAIL PROTECTED] wrote in message
012c01c0a7a0$9c3922d0$0101a8c0@server">news:012c01c0a7a0$9c3922d0$0101a8c0@server...
 I wonder if I am posting this to the right group but can anyone tell me
how
 to import all the tables (including the information)from the server to my
 local machine and vice versa. I am using a mysql database.

 Many Thanks
 Pankaj


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

2001-03-07 Thread Beau Lebens

i think there is a command something like mysqldump
try checking the mysql docs

At 01:06 PM 3/8/01 +0530, Pankaj Ahuja wrote:
Thanks, but is there any other method. Say something at telnet prompt. I do
not use phpmyadmin


- Original Message -
From: Emre YILMAZ
To: [EMAIL PROTECTED]
Sent: Thursday, March 08, 2001 1:01 PM
Subject: Re: [PHP-DB] Import


if you are using phpmyadmin just click your database (its listed at the left
column) then at the right side select "structure and data" which is located
under "View dump(schema) of database" part, then select send and then click
"go"
you ll be asked for the path of your backup sql file. thats it. :)


""Pankaj Ahuja"" [EMAIL PROTECTED] wrote in message
012c01c0a7a0$9c3922d0$0101a8c0@server">news:012c01c0a7a0$9c3922d0$0101a8c0@server...
  I wonder if I am posting this to the right group but can anyone tell me
how
  to import all the tables (including the information)from the server to my
  local machine and vice versa. I am using a mysql database.
 
  Many Thanks
  Pankaj
 
 
  --
  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]

-- 
Beau Lebens - Web Master
Insurance My Way, Your Friendly Online Broker
(08) 9226 5888
http://www.insurancemyway.com.au/


-- 
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] alphabetical order

2001-03-07 Thread karakedi

i am using mysql :)


""karakedi"" [EMAIL PROTECTED] wrote in message
987dse$svd$[EMAIL PROTECTED]">news:987dse$svd$[EMAIL PROTECTED]...
 hi there,
 i ve created a database. there are two rows in it, one is "id" and the
other
 consists of "film names".

 i ve managed to list and print them out sorting by ids, but i just wonder
if
 there is a way to sort them in alphebetical order.

 any example is high appreciated. thx in adv.




 --
 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] alphabetical order

2001-03-07 Thread Beau Lebens

you should be able to do this exactly the same as you have the id

SELECT * FROM film_details ORDER BY film_names ASC

should sort by the film name, 'A' first, up to 'Z'

if that doesn't work, perhaps get all the results, drop them into an array 
and then sort the array, then process the array.

HTH
Beau



At 09:59 AM 3/8/01 +0200, karakedi wrote:
i am using mysql :)


""karakedi"" [EMAIL PROTECTED] wrote in message
987dse$svd$[EMAIL PROTECTED]">news:987dse$svd$[EMAIL PROTECTED]...
  hi there,
  i ve created a database. there are two rows in it, one is "id" and the
other
  consists of "film names".
 
  i ve managed to list and print them out sorting by ids, but i just wonder
if
  there is a way to sort them in alphebetical order.
 
  any example is high appreciated. thx in adv.
 
 
 
 
  --
  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]

-- 
Beau Lebens - Web Master
Insurance My Way, Your Friendly Online Broker
(08) 9226 5888
http://www.insurancemyway.com.au/


-- 
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] alphabetical order

2001-03-07 Thread karakedi

woa that was a real quick help :)
thx alot


"Beau Lebens" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 you should be able to do this exactly the same as you have the id

 SELECT * FROM film_details ORDER BY film_names ASC

 should sort by the film name, 'A' first, up to 'Z'

 if that doesn't work, perhaps get all the results, drop them into an array
 and then sort the array, then process the array.

 HTH
 Beau



 At 09:59 AM 3/8/01 +0200, karakedi wrote:
 i am using mysql :)
 
 
 ""karakedi"" [EMAIL PROTECTED] wrote in message
 987dse$svd$[EMAIL PROTECTED]">news:987dse$svd$[EMAIL PROTECTED]...
   hi there,
   i ve created a database. there are two rows in it, one is "id" and the
 other
   consists of "film names".
  
   i ve managed to list and print them out sorting by ids, but i just
wonder
 if
   there is a way to sort them in alphebetical order.
  
   any example is high appreciated. thx in adv.
  
  
  
  
   --
   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]

 --
 Beau Lebens - Web Master
 Insurance My Way, Your Friendly Online Broker
 (08) 9226 5888
 http://www.insurancemyway.com.au/


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