Re: [PHP-DB] Database Transactions and HTTP statelessness

2001-08-29 Thread Doug Semig

Hi BP--

0. User A loads Record R.
1. User B loads Record R.
2. User B edits and saves Record R.
(Saving involves starting a transaction, retrieving R from the DB,
comparing the values with the original values to make sure it is 
the same record, and then the UPDATE and then commiting the
transaction).
3. User A edits and saves Record R.
(Saving involves starting a transaction, retrieving R from the DB,
comparing the values with the original values to make sure it is 
the same record, and when it's not, rolling back the transaction and
notifying the user that the record has already been modified by 
another user or process).

Hope this helps!
Doug

At 02:02 AM 8/29/01 GMT, Bopolissimus Platypus wrote:
hello all,

I've got a question about what's got to be a common problem.
I'm sort of doing a survey to see how others have solved this
problem before so that I can choose one that's best for me.

Basics:
The software is a web based data entry system.
Sessions are maintained (so that users don't have to
 login after every database operation, and for 
 security - users can only perform actions that
 are allowed to their login or group0.

Use Case:
0.   User A loads Record R.
1.   User B loads the same Record R.
2.   User B edits and saves Record R.
3.   User A edits and saves Record R.

   [--snip--]

--Doug's Signature File
~ ~ ~ I'm proud to work for GLISnet,  Michigan's best ISP ~ ~ ~
--1.888.445.4763---8am to 8pm every day---http://www.glis.net--
The views and opinions expressed in this email are my
own and may not be those of my employer.


-- 
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] Error making php with informix

2001-08-29 Thread Paul Gardiner

Hello again,

What version of Informix are you now running? Last time we spoke you were
only on 5. AFAIK you need at least ver 7

In the current version(4.0.6) of PHP the Informix libraries must be
specified in LIBS when compiling Apache. Jani has hopefully fixed this
problem for 4.0.7.  Have a look back to the last mail I sent you about a
month ago for more info.

Regards,
- Paul -

- Original Message -
From: Muciño Zúñiga Marco Antonio [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 28, 2001 7:28 PM
Subject: [PHP-DB] Error making php with informix


 Hi, I'm trying to install php-4.0.6 in my SCO Unix box but when I run the
 make command I get the next error:

 /bin/sh ../libtool --silent --mode=link gcc  -g -O2  -o
ibZend.la  -lifsql
 -lif
 asf -lifgen -lifos -lifgls -lnsl_s -lcrypt_i -lgen -lsocket -lnsl -lsuds
 -ltinfo
  -lprot -lx -ltinfo -lc -lphpifx -lifglx -lcrypt -lm -lsocket -lifsql
 -lifasf -l
 ifgen -lifos -lifgls -lnsl_s -lcrypt_i
/usr/lib/libgen.a -lsocket -lnsl -lm
 -lsu
 ds -ltinfo -lprot -lx -ltinfo -lm -lc /usr/informix/lib/esql/checkapi.o
 -lsocket
   zend_language_parser.lo zend_ini_parser.lo zend_alloc.lo zend_compile.lo
 zend_
 constants.lo zend_dynamic_array.lo zend_execute.lo zend_execute_API.lo
 zend_high
 light.lo zend_llist.lo zend_opcode.lo zend_operators.lo zend_ptr_stack.lo
 zend_s
 tack.lo zend_variables.lo zend.lo zend_API.lo zend_extensions.lo
 zend_hash.lo ze
 nd_list.lo zend_indent.lo zend_builtin_functions.lo zend_sprintf.lo
 zend_ini.lo
 libZend_c.la
 libtool: link: cannot build libtool library `libZend.la' from non-libtool
 object
 s: /usr/lib/libgen.a /usr/informix/lib/esql/checkapi.o
 make[1]: *** [libZend.la] Error 1
 make[1]: Leaving directory `/tmp/php-4.0.6/Zend'
 make: *** [all-recursive] Error 1

 Do you have any idea what I'm doing wrong? Thanx in advance.


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




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

2001-08-29 Thread Jorge Giménez Mayorgas

Hi again.

I'm still trying but I can't do it.

I have tried this :

$values=$values.addslashes('.$value).addslashes(');
The result of this would be something like this
INSERT INTO Carrocerias VALUES (\'Ber\',\' Berlina\')
The mysql_errno is 1064.

I've tried mysql_escape_tring with the same result.
Before INSERT statement I put this
mysql_escape_string(\);
but it didn't work.

Can anyone where I could found an example ? I have looked on the online
manual of php but they are SELECT examples, there are no INSERT examples.
 I ' m a newbie PHP programmer .

Thanks again,

Jorge Giménez

- Original Message -
From: Jorge Giménez Mayorgas [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 28, 2001 6: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]




[PHP-DB] Re: Database Transactions and HTTP statelessness

2001-08-29 Thread Bopolissimus Platypus

On Tue, 28 Aug 2001 23:55:32 -0300, [EMAIL PROTECTED] (Manuel Lemos)
wrote:
The solution is to pass data between pages and only commit it when you
are done with all the data that you need to grab from the user.
Transactions can't be kept between HTTP requests, but you can pass data
between pages so you keep the choices of the user that reaches to the
end of your process.

that's not really addressing my concern.  i'm not worried about the
coding details of multiple forms and such.  i'm concerned about
data consistency.

in case i wasn't clear enough in the original post:

let's say each row has an identifying serial number, id:

User A loads and edits the row with id=1.  row is not yet saved. 
 lastname and state fields modified but only in the browser
 for now, not yet POSTed to the server.  state is set to SC.
 lastname is, ah, Lemos.

User B loads and edits the row with id=1.  row is not yet saved.
 state field is set to NC.  no other fields edited.

User B SAVES his edits.  on disk, the row iwth id=1 now has state
 set to NC.

User A SAVES his edits.  on disk, the row with id=1 has the
 changed lastname (maybe a problem, but probably not),
 and state is set to SC.

the lack of row locking has made B's change of the state
disappear.  and it might be that B's change is the correct one.
so now A has the wrong state data.

ideally, if B tries to save his edits, the system would tell him
that A (or someone, possibly unspecified) has the lock on
the row and the edit cannot be saved.  B can then decide
what to do (wait before trying to save again?  reload the
data so that he gets latest data?  before loading the
record, try to get a select for update, so that the select
won't even return until the row is available for editing
and B OWNS the lock (the select won't return until
the lock is available, or it may return but with error so 
that B knows that he doesn't have the lock).

an ugly alternative i've considered is keeping the
original (unedited) data in session variables and BEFORE
WRITING THE EDITED DATA, first get a select for
update (which locks the row), check if the data has 
changed, and only if it hasn't, do the write.  if the 
data is not the same as the original unedited 
data, then someone else has modified the data 
and we reload the record and allow edits by 
the user before trying to write again (possibly
with some smart features to minimize retyping of
edits).

there are also non-transaction based hacks one of 
which would involve having a lock file that stores 
locks owned by particular logical sessions.  
all database access would then first check to see 
if there is a lock record for the particular row 
being requested.  if it's locked, then the row 
can still be viewed, but it would be read-only.  
if a 'session' owns the lock, then the row 
would be editable (there would be a Submit 
or Update Database button, which would 
not be there ifthe row is read-only because 
some other session owns the lock).  there 
would then be some sort of regular lock 
clearing program which would clear out locks 
which had timed out.

You may want to take a look at this multi-page forms that may help you
to keep data between forms that can be walked back and forth.

thanks for the reply, but that's not the problem i'm worried
about :).

tiger

-- 
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] Database Transactions and HTTP statelessness

2001-08-29 Thread Bopolissimus Platypus

On Wed, 29 Aug 2001 03:18:01 -0400, [EMAIL PROTECTED] (Doug Semig)
wrote:

0. User A loads Record R.
1. User B loads Record R.
2. User B edits and saves Record R.
   (Saving involves starting a transaction, retrieving R from the DB,
comparing the values with the original values to make sure it is 
   the same record, and then the UPDATE and then commiting the
   transaction).
3. User A edits and saves Record R.
   (Saving involves starting a transaction, retrieving R from the DB,
comparing the values with the original values to make sure it is 
   the same record, and when it's not, rolling back the transaction and
   notifying the user that the record has already been modified by 
   another user or process).

thanks.  that was one of the alternatives i'd been considering.  
heh, i was trying to avoid the complexity.  after all, if the database
already has locking and data consistency built-in, why reinvent
the wheel, right?  but that denial of service thing is a problem
(and it would be a SELF-denial-of-service :).  thanks for voting
for this alternative.  i'll wait a few days for others to comment
and maybe provide alternatives before committing to one 
approach :).

tiger



-- 
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: Database Transactions and HTTP statelessness

2001-08-29 Thread Dave Watkinson

maybe you could add a column called lasteditdate to the table? Set it as
a DATETIME type and then check that the last edited date/time is not
within that last, say, 10 minutes? If it is compare the data?

Or add a TINYINT column to the table with a default value of 0, and when
a user chooses to edit the row, set the value to 1. If someone chooses
to edit a row and the value is 1 tell them it's locked elsewhere (maybe
even tell them who's got it). Then when they update their changes reset
the 1 to a 0.

Just a coupla ideas :-)


Dave


-Original Message-
From: Bopolissimus Platypus [mailto:[EMAIL PROTECTED]]
Sent: 29 August 2001 13:10
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: Database Transactions and HTTP statelessness


On Tue, 28 Aug 2001 23:55:32 -0300, [EMAIL PROTECTED] (Manuel Lemos)
wrote:
The solution is to pass data between pages and only commit it when you
are done with all the data that you need to grab from the user.
Transactions can't be kept between HTTP requests, but you can pass data
between pages so you keep the choices of the user that reaches to the
end of your process.

that's not really addressing my concern.  i'm not worried about the
coding details of multiple forms and such.  i'm concerned about
data consistency.

in case i wasn't clear enough in the original post:

let's say each row has an identifying serial number, id:

User A loads and edits the row with id=1.  row is not yet saved. 
 lastname and state fields modified but only in the browser
 for now, not yet POSTed to the server.  state is set to SC.
 lastname is, ah, Lemos.

User B loads and edits the row with id=1.  row is not yet saved.
 state field is set to NC.  no other fields edited.

User B SAVES his edits.  on disk, the row iwth id=1 now has state
 set to NC.

User A SAVES his edits.  on disk, the row with id=1 has the
 changed lastname (maybe a problem, but probably not),
 and state is set to SC.

the lack of row locking has made B's change of the state
disappear.  and it might be that B's change is the correct one.
so now A has the wrong state data.

ideally, if B tries to save his edits, the system would tell him
that A (or someone, possibly unspecified) has the lock on
the row and the edit cannot be saved.  B can then decide
what to do (wait before trying to save again?  reload the
data so that he gets latest data?  before loading the
record, try to get a select for update, so that the select
won't even return until the row is available for editing
and B OWNS the lock (the select won't return until
the lock is available, or it may return but with error so 
that B knows that he doesn't have the lock).

an ugly alternative i've considered is keeping the
original (unedited) data in session variables and BEFORE
WRITING THE EDITED DATA, first get a select for
update (which locks the row), check if the data has 
changed, and only if it hasn't, do the write.  if the 
data is not the same as the original unedited 
data, then someone else has modified the data 
and we reload the record and allow edits by 
the user before trying to write again (possibly
with some smart features to minimize retyping of
edits).

there are also non-transaction based hacks one of 
which would involve having a lock file that stores 
locks owned by particular logical sessions.  
all database access would then first check to see 
if there is a lock record for the particular row 
being requested.  if it's locked, then the row 
can still be viewed, but it would be read-only.  
if a 'session' owns the lock, then the row 
would be editable (there would be a Submit 
or Update Database button, which would 
not be there ifthe row is read-only because 
some other session owns the lock).  there 
would then be some sort of regular lock 
clearing program which would clear out locks 
which had timed out.

You may want to take a look at this multi-page forms that may help you
to keep data between forms that can be walked back and forth.

thanks for the reply, but that's not the problem i'm worried
about :).

tiger

-- 
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] Can I UPDATE 2 tables with 1 SQL statement?

2001-08-29 Thread Robert Klinkenberg

This is not standard SQL so most databases won't support it.

Access is supposed to support this kind of updates, but then it won't work
on other db's

A better way to do this is to issue two separate inserts right after each
other within a transaction.
But this will also crash some databases as not all databases support
transactions, notably MySQL 
and Access. However oracle, db2, interbase,  do support this kind of
thing and this is the standard
way of handling multiple connected sql commands.

The simple way is to issue two separate inserts right after each other
without transactions but this might
lead to concurrency problems

Robert Klinkenberg








-- 
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] Could get all data from MYSQL using Mysql_fetch_array!!

2001-08-29 Thread Jack

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-DB] Couldn't get all data using the mysql_fetch_array function, Pls Help!!!!

2001-08-29 Thread Jack

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]




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] MD5 (' ')

2001-08-29 Thread André P.

I had a similar problem. I think it has to do with the character encoding 
of the output hash.

My only resort (very ugly!!) was to have a perl script wich calculated the 
hash. The perl script looks like:

#!/usr/bin/perl
use Digest::MD5 qw(md5_base64);
print md5_base64($ARGV[0]);

Maybe your problem is similar. The perl MD5 modules seems to have more 
encoding options than the php one. Have a look it might give you a clue as 
to where the problem is.

Andre

At 18:10 29/08/2001 +0300, Andrey Hristov wrote:
I'm not so sure, but there is another parameter to md5() - the salt.

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

- Original Message -
From: Ignat Ikryanov [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 29, 2001 4:45 PM
Subject: [PHP-DB] MD5 (' ')


Hi!
I use md5 function to encrypt users password stored in MySql database. 
When I try encrypt string 'asdf' using md5 function I
retrieve:
912ec803b2ce49e4a541068d495ab570
But in 'shodow' file of my linux (Debian 2.2 used MD5 to encrypt users 
password) 'asdf' string looks like:
$1$arjq575D$rnHVFfcQE7.h2EgSU7yzQ1

Why results are different?




--
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] MD5 (' ')

2001-08-29 Thread Sheridan Saint-Michel

MD5 doesn't use a salt.
http://www.faqs.org/rfcs/rfc1321.html

Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company
www.foxjet.com


- Original Message -
From: Andrey Hristov [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 29, 2001 10:10 AM
Subject: Re: [PHP-DB] MD5 (' ')


 I'm not so sure, but there is another parameter to md5() - the salt.

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

 - Original Message -
 From: Ignat Ikryanov [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, August 29, 2001 4:45 PM
 Subject: [PHP-DB] MD5 (' ')


 Hi!
 I use md5 function to encrypt users password stored in MySql database.
When I try encrypt string 'asdf' using md5 function I
 retrieve:
 912ec803b2ce49e4a541068d495ab570
 But in 'shodow' file of my linux (Debian 2.2 used MD5 to encrypt users
password) 'asdf' string looks like:
 $1$arjq575D$rnHVFfcQE7.h2EgSU7yzQ1

 Why results are different?




 --
 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] Database Transactions and HTTP statelessness

2001-08-29 Thread Doug Semig

Hi BP--

There's also named cursors, but then you're going to have the problem of
time.  That is if you create a cursor FOR UPDATE and the user never saves
the record or never cancels the edit (just closes her browser, for
instance), then you're messed up and have locks floundering around in the db.

In the HTTP stateless scenario, you really do want to do everything within
the timespan of a single page-view.  Dave Watkinson's suggestion for a
column in the table to store some kind of version info (a timestamp or some
other identifier that is updated every time the record changes) is a good
one because it makes detecting an updated row a lot easier than comparing
all of the original values from the originally loaded record to what's
there when you finally go to save it.  

However, there may be times when Dave's suggestion can be overly
restrictive.  Let's say User A changes one column of Record R and User B
changes a different column of Record R.  In that case, the changes do not
step on each other and probably should be allowed.  Dave's suggestion for a
per-record version identifier would kick out the 2nd person to save the
record's edits with the this record has been changed by another user or
process message.  Perhaps that's correct for your application, perhaps it
is not.  You and your customer have to decide.

That's why I tend to compare the originally loaded values of the fields
that have been changed by the user with the fields as they appear in the
record during the transaction that UPDATEs the record.  If they're
different then those fields really have been modified by another user or
process and the transaction should be abandoned until the user gets a
chance to review the situation.

Hope this helps,
Doug

At 12:13 PM 8/29/01 GMT, Bopolissimus Platypus wrote:
On Wed, 29 Aug 2001 03:18:01 -0400, [EMAIL PROTECTED] (Doug Semig)
   [--snip--]
thanks.  that was one of the alternatives i'd been considering.  
heh, i was trying to avoid the complexity.  after all, if the database
already has locking and data consistency built-in, why reinvent
the wheel, right?  but that denial of service thing is a problem
(and it would be a SELF-denial-of-service :).  thanks for voting
for this alternative.  i'll wait a few days for others to comment
and maybe provide alternatives before committing to one 
approach :).

tiger
   [--snip--]

--Doug's Signature File
~ ~ ~ I'm proud to work for GLISnet,  Michigan's best ISP ~ ~ ~
--1.888.445.4763---8am to 8pm every day---http://www.glis.net--
The views and opinions expressed in this email are my
own and may not be those of my employer.


-- 
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: Could get all data from MYSQL using Mysql_fetch_array!!

2001-08-29 Thread Andrew Chase

You did fetch all the data by using '*' in your query, but you can't use '*'
as a wildcard when referring to an associative array (which is what $row
is) - you need to step through each key in the array:

while ($row= mysql_fetch_array($result,MYSQL_ASSOC))
{
$fields = array_keys($row);
foreach($fields as $key){
print ({$.row[$key].});
}
}

Or you could do it longhand -

while ($row= mysql_fetch_array($result,MYSQL_ASSOC))
{
print ({$row[Reason]});
print ({$row[OtherField1]});
print ({$row[OtherField2]});
}

Longhand might even be more useful if you want to format your results
nicely.

HTH,

-Andy


 -Original Message-
 From: Jack [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 29, 2001 8:13 AM
 To: [EMAIL PROTECTED]
 Subject: Could get all data from MYSQL using Mysql_fetch_array!!


 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-DB] Pleazzzzzz Help.

2001-08-29 Thread Jason Brashear

How do I creat a form that submits the collected information to a databas
(MySQL)
And email a template to the submitter with the collected information and to
a few other parties
based on seprate templates for the E-Mail?

Please help...

-Jason
[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] Tablename issue..

2001-08-29 Thread Tom Wallace

Hola,

  I'm having a difficult time figuring out the syntax here -- my table name
has spaces  dashes in it..Unfortunately I can't permanently change the
tablename.. I've tried a half dozen different ways to access the table, each
return an error similar to this:

Warning: SQL error: [ISAM]No data found, SQL state S00 in SQLExecDirect in
c:\inetpub\wwwroot\test8.php on line 14

but removing the spaces from the tablename and updating the php fixes it..

 any ideas?

$sql2 = odbc_exec($conn,SELECT Character_Field FROM ABC - Table);

Thanks,
-Tom




-- 
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] MD5 (' ')

2001-08-29 Thread Sheridan Saint-Michel

 - Original Message -
 From: Ignat Ikryanov [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, August 29, 2001 4:45 PM
 Subject: [PHP-DB] MD5 (' ')


 Hi!
 I use md5 function to encrypt users password stored in MySql database.
 When I try encrypt string 'asdf' using md5 function I
 retrieve:
 912ec803b2ce49e4a541068d495ab570
 But in 'shodow' file of my linux (Debian 2.2 used MD5 to encrypt users
 password) 'asdf' string looks like:
 $1$arjq575D$rnHVFfcQE7.h2EgSU7yzQ1

 Why results are different?

Unix Shadow passwords are actually computed using an alogrithm, md5 is part
of that algorithm but not the entire thing.  You can immediately tell that
$1$arjq575D$rnHVFfcQE7.h2EgSU7yzQ1
is not an md5 hash because all md5 hashes are 32 characters and this is 35.

Shadow passwords computed with this algorithm are start $1 and then have a 8
character salt surrounded by $'s.  The last part of the hash is 22
characters which
are computed by the algorithm.  So in the above string $1$ indicates that it
is a shadow
password, and arjq575D is the salt followed by $.  I looked around on google
for a bit, but
could not find the specifc algoritm Debian uses to compute the last 22
characters.  I'll let
you know if I find it.  You might also want to try this script:

http://limonez.net/~jure/php/md5crypt.phps

I noticed it in the user notes for md5.  It says it makes FreeBSD style
shadow passwords
though, and I am not sure if FreeBSD uses the same algorithm as Debian or
not.
(I also have not actually verified that the above script does ANYTHING =P )

Good luck.  I'll let you know if I find anything specific on Debian.

Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company
www.foxjet.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] Tablename issue..

2001-08-29 Thread Tom Wallace


 Tried this - same errors --  Also tried the following permutations
(courtesy of Trevor Lanyon) --

You can try to encapsulate the table name with hard bracket
[Table - Name]

You can escape the character with a slash (I don't think this will work):

Table\ \- Name

You can escape the characters with the hexidecimal url encoding (I know this

only to work with one try of database, and I think the client is actually

stripping it off)

Table%20%2D%20Name



The ODBC source I'm trying to connect to is a Remedy (Action Request System)
4.5 system running on top of a Oracle 8 database.

Thanks - Tom

Ryan Marrs [EMAIL PROTECTED] wrote in message
EA9290E62E6CD311859200805F85164902FB13DE@EXCHANGE">news:EA9290E62E6CD311859200805F85164902FB13DE@EXCHANGE...
 Try putting Brackets [] around the spaces.  This will typically fix the
 problem, ie:

 $sql2 = odbc_exec($conn,SELECT [Character Field] FROM [ABC - Table]);

 Let me know if it works!

 Ryan

 -Original Message-
 From: Tom Wallace [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 29, 2001 3:06 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Tablename issue..

 Hola,

   I'm having a difficult time figuring out the syntax here -- my table
name
 has spaces  dashes in it..Unfortunately I can't permanently change the
 tablename.. I've tried a half dozen different ways to access the table,
each
 return an error similar to this:

 Warning: SQL error: [ISAM]No data found, SQL state S00 in SQLExecDirect in
 c:\inetpub\wwwroot\test8.php on line 14

 but removing the spaces from the tablename and updating the php fixes it..

  any ideas?

 $sql2 = odbc_exec($conn,SELECT Character_Field FROM ABC - Table);

 Thanks,
 -Tom




 --
 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] example of making Next 10 entries - previous ..

2001-08-29 Thread Andrius Jakutis

Hello,


I need example of making simple thing: to list only 10 entries per page, and
next 10 is shown after next page button is clicked.

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]




Re: [PHP-DB] example of making Next 10 entries - previous ..

2001-08-29 Thread biorn

Here is an excellent example at PHPBuilder (a great site for finding tutorials)

http://www.phpbuilder.com/columns/rod2221.php3

HTH

Maureen


Andrius Jakutis [EMAIL PROTECTED] said:

 Hello,
 
 
 I need example of making simple thing: to list only 10 entries per page, and
 next 10 is shown after next page button is clicked.
 
 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-DB] Oracle takes 5 seconds to logon in PHP, ASP is instant??? Wussup?

2001-08-29 Thread Bawy

?
$db = newora;
$c2 = ocilogon(cst,cst,$db);
echo done;
?
This takes 5 seconds to appear, what is wrong? An ASP script I wrote
connects instantly. TNSPING shows newora to be OK and responds instantly.





-- 
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: Oracle takes 5 seconds to logon in PHP, ASP is instant??? Wussup?

2001-08-29 Thread Manuel Lemos

Hello,

Bawy wrote:
 
 ?
 $db = newora;
 $c2 = ocilogon(cst,cst,$db);
 echo done;
 ?
 This takes 5 seconds to appear, what is wrong? An ASP script I wrote
 connects instantly. TNSPING shows newora to be OK and responds instantly.

Try OCIPlogon.

Regards,
Manuel Lemos

-- 
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: example of making Next 10 entries - previous ..

2001-08-29 Thread Alexandre Santos

Andrius Jakutis wrote:
 
 Hello,
 
 I need example of making simple thing: to list only 10 entries per page, and
 next 10 is shown after next page button is clicked.
 
 Thanks
Look in www.phpbuider.com for a article about previous/next buttons.

Alex

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

2001-08-29 Thread Jeff Oien

I have a date like this in date format in MySQL
2001-08-29

and I want it to say
August 29, 2001

I tried this and it didn't work. 
select date_format('creation_date', '%b %D, %Y') from Chart_Users;

Could you tell me what I'm doing wrong or how I should do this? Thanks.
Jeff Oien

-- 
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] Selection an id from a table where it doesn't exisit in another

2001-08-29 Thread Scott Mebberson

Hi Guys,

I have two tables, words and searchwords. words contains a list of words
with an id number next to them and searchwords contains a page id with a
word id (from the words table). I want to select all of the id's from the
words table which does not exist in the word_id feild in the searchwords
table.

Make sense, it is for searching? Let me know if it doesn't.

This is the SQL query I am running on MySQL (3.22) - SELECT id FROM words,
searchwords WHERE words.id != searchwords.word_id;

It isn't working. All it does it return a list of results which are totally
incorrect.

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]




Re: [PHP-DB] Date_Format Question

2001-08-29 Thread boclair


- Original Message -
From: Jeff Oien [EMAIL PROTECTED]
To: PHP-DB [EMAIL PROTECTED]
Sent: Thursday, August 30, 2001 11:07 AM
Subject: [PHP-DB] Date_Format Question


 I have a date like this in date format in MySQL
 2001-08-29

 and I want it to say
 August 29, 2001

 I tried this and it didn't work.
 select date_format('creation_date', '%b %D, %Y') from Chart_Users;

Perhaps

$result= SELECT date_format(creation_date,'%b%D,%y') AS created  FROM
db.Chart_Users;

Then from the array $myrow['created']   instead of
$myrow['creation_date']

Tim Morris


-- 
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] SELECT giving too much :)

2001-08-29 Thread Beau Lebens

Hi guys, I have a set-up to query a database by allowing the user to build a
query from selecting fields, restrictions etc etc.

It produces the following;

SELECT students.fname, courses.title AS course FROM students, courses,
course_enrolments, groups, locations, staff WHERE
(students.studentID=course_enrolments.studentID AND
course_enrolments.courseID=courses.courseID) AND
(students.groupID=groups.groupID) AND (staff.staffID=courses.staffID) ORDER
BY fname ASC

which gets the right results, but it returns something like this;

+---+--+
| fname | course   |
+---+--+
| Beau  | Graduate Certificate in Learning Technologies (K-12) |
| Beau  | Graduate Certificate in Learning Technologies (K-12) |
| Grant | Short Course in Learning Technologies (K-12) |
| Grant | Short Course in Learning Technologies (K-12) |
+---+--+

and it should only be returning one of each of those records any
suggestions?

thanks

Beau


-- 
Beau F Lebens, Technical Officer
National Key Centre for School Science and Mathematics
Science and Mathematics Education Centre
Curtin University of Technology,
GPO Box U1987 Perth, Western Australia 6845

t: +61 8 9266 7297 (has voice-mail)
f: +61 8 9266-2503 (ATT: Beau Lebens)
e: [EMAIL PROTECTED]
w: http://learnt.smec.curtin.edu.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] Date_Format Question

2001-08-29 Thread boclair


- Original Message -
From: boclair [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; PHP-DB [EMAIL PROTECTED]
Sent: Thursday, August 30, 2001 1:09 PM
Subject: Re: [PHP-DB] Date_Format Question



 - Original Message -
 From: Jeff Oien [EMAIL PROTECTED]
 To: PHP-DB [EMAIL PROTECTED]
 Sent: Thursday, August 30, 2001 11:07 AM
 Subject: [PHP-DB] Date_Format Question


  I have a date like this in date format in MySQL
  2001-08-29
 
  and I want it to say
  August 29, 2001
 
  I tried this and it didn't work.
  select date_format('creation_date', '%b %D, %Y') from Chart_Users;

 Perhaps

 $result= SELECT date_format(creation_date,'%b%D,%y') AS created
FROM
 db.Chart_Users;

 Then from the array $myrow['created']   instead of
 $myrow['creation_date']


The formatting you need is %M %d, %Y.  Careless of me.

Tim Morris


-- 
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] General PHP problem

2001-08-29 Thread Ali Nayeri

Hi guys

I know that this actually doesn't belong here but I had a question that I
think has to do with installation and configuration.

I volunteer at this FreeNet group and the SysAdmin there recently installed
PHP 4 on an Apache server on a Solaris Box. But when I tried to test it, I
found something amazing.

The php commands worked fine (like print, echo, etc..) but the variables
didn't show up. I tried sending variables from an HTML form to a php file to
print the submitted values. It prints everything other than the variables. I
tried including the variable inside the php file itself. It still didn't
print. I'm puzzled. I think it should be config problem but what is?

If anyone knows how to solve this problem, please let me know.

Thanks

Ali


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.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] SELECT giving too much :)

2001-08-29 Thread Doug Semig

Hi Beau--

This is just a wild guess (I've only glanced at your SQL), but do you have
two locations in your locations table?

You might want to try yanking locations out of the join since you're not
using it in your WHERE clause or showing any info from it.

Doug

At 12:06 PM 8/30/01 +0800, Beau Lebens wrote:
Hi guys, I have a set-up to query a database by allowing the user to build a
query from selecting fields, restrictions etc etc.

It produces the following;

SELECT students.fname, courses.title AS course FROM students, courses,
course_enrolments, groups, locations, staff WHERE
(students.studentID=course_enrolments.studentID AND
course_enrolments.courseID=courses.courseID) AND
(students.groupID=groups.groupID) AND (staff.staffID=courses.staffID) ORDER
BY fname ASC
   [--snip--]

--Doug's Signature File
~ ~ ~ I'm proud to work for GLISnet,  Michigan's best ISP ~ ~ ~
--1.888.445.4763---8am to 8pm every day---http://www.glis.net--
The views and opinions expressed in this email are my
own and may not be those of my employer.


-- 
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] SELECT giving too much :)

2001-08-29 Thread Beau Lebens

Actually yes I do :)
thanks for that - it fixes it when i remove the FROM locations
although I didn't want to have to pull it, because it is going to mean some
ugly testing and stuff that I wanted to avoid - oh well, looks like I have
no choice now :)

Cheers

beau

// -Original Message-
// From: Doug Semig [mailto:[EMAIL PROTECTED]]
// Sent: Thursday, 30 August 2001 12:31 PM
// To: [EMAIL PROTECTED]
// Subject: Re: [PHP-DB] SELECT giving too much :)
// 
// 
// Hi Beau--
// 
// This is just a wild guess (I've only glanced at your SQL), 
// but do you have
// two locations in your locations table?
// 
// You might want to try yanking locations out of the join 
// since you're not
// using it in your WHERE clause or showing any info from it.
// 
// Doug
// 
// At 12:06 PM 8/30/01 +0800, Beau Lebens wrote:
// Hi guys, I have a set-up to query a database by allowing 
// the user to build a
// query from selecting fields, restrictions etc etc.
// 
// It produces the following;
// 
// SELECT students.fname, courses.title AS course FROM 
// students, courses,
// course_enrolments, groups, locations, staff WHERE
// (students.studentID=course_enrolments.studentID AND
// course_enrolments.courseID=courses.courseID) AND
// (students.groupID=groups.groupID) AND 
// (staff.staffID=courses.staffID) ORDER
// BY fname ASC
//[--snip--]
// 
// --Doug's Signature File
// ~ ~ ~ I'm proud to work for GLISnet,  Michigan's best ISP ~ ~ ~
// --1.888.445.4763---8am to 8pm every day---http://www.glis.net--
// The views and opinions expressed in this email are my
// own and may not be those of my employer.
// 
// 
// -- 
// 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] SELECT giving too much :)

2001-08-29 Thread Doug Semig

Hi Beau--

Alternatively you could probably include an AND for the location ID to link
up with whatever it is supposed to link up to in the WHERE clause.

But I have no idea how you responded to my message in 2 minutes flat!  Are
you a remarkably complex AI autoresponder that knocks the socks off of
ELIZA (or whatever it was) style programs?  Dang!  2 minutes!  Good job
grin.

Doug

At 12:33 PM 8/30/01 +0800, Beau Lebens wrote:
Actually yes I do :)
thanks for that - it fixes it when i remove the FROM locations
although I didn't want to have to pull it, because it is going to mean some
ugly testing and stuff that I wanted to avoid - oh well, looks like I have
no choice now :)

Cheers

beau
   [--snip--]

--Doug's Signature File
~ ~ ~ I'm proud to work for GLISnet,  Michigan's best ISP ~ ~ ~
--1.888.445.4763---8am to 8pm every day---http://www.glis.net--
The views and opinions expressed in this email are my
own and may not be those of my employer.


-- 
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: Oracle takes 5 seconds to logon in PHP, ASP is instant??? Wussup?

2001-08-29 Thread Bawy

I did, an unfortunitly no difference. I am running PHP4.0.6 on win2k using
iis5.

Anyone else experiance anything like this?


Manuel Lemos [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello,

 Bawy wrote:
 
  ?
  $db = newora;
  $c2 = ocilogon(cst,cst,$db);
  echo done;
  ?
  This takes 5 seconds to appear, what is wrong? An ASP script I wrote
  connects instantly. TNSPING shows newora to be OK and responds
instantly.

 Try OCIPlogon.

 Regards,
 Manuel Lemos



-- 
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: General PHP problem

2001-08-29 Thread Ali Nayeri

Hi again,

I thought maybe the example files would be useful. They're attached.

Ali


-- 
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: General PHP problem

2001-08-29 Thread Ali Nayeri

 File php1.php

html
head
titlePHP test/title
/head
body
?php

//$name = Ali;
print(pHi $name/p);

?
/body
/html


File test.htm

html
head
titleTest/title
/head
body
form name=form1 method=get action=php1.php
Name:input type=text name=name /
input type=submit name=submit value=submit /
/form
/body
/html

Thanks

Ali

_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.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]