[PHP-DB] OCIExecute very slow when Updating rows

2003-07-08 Thread Krueger, Philipp
hi there!

sorry for bothering but i can't help myself anymore. i've written a small
hardware-database for my company with a webinterfaced based upon php. now:
everything works just fine - selects, inserts - everything works except for
the damn updates! 

### CODE ###

$stmt = OCIParse($con,$query);
if(!$stmt){$error=$con? OCIError($con):OCIError();echo Error:
$error[code] $error[message]br;}
else{
OCIExecute($stmt,OCI_COMMIT_ON_SUCCESS);
$error = OCIError($stmt);
if ($error['code']){print Fehler:
[.$error['message'].];}}
OCIFreeStatement($stmt);
OCILogoff($con);

# ENDCODE #

i'm 100% sure everything is correct since sometimes the update DOES work - i
think it doesn't work anymore when there is the slightest activity on the
oracle-server (it's an  double cpu PowerPC RS64-IV running AIX Version 4.3
and Oracle 8.1.7.2) the server is BORED all the time but still the script is
not working... the script just times out 99 times and then for once it works
again.
the command which causes this delay is
OCIExecute($stmt,OCI_COMMIT_ON_SUCCESS);. i tried to change the code to

### CODE ###

OCIExecute($stmt,OCI_DEFAULT);
OCICommit($con);

# ENDCODE #

but it still wouldn't work - when i comment OCIExecute out the script works
again - which is out of question of course since i need the damn script to
execute.
when i take the query and paste it in sqlplus to execute it manually
everything goes as planned. i'm beginning to get desperate here... any ideas
why it won't work?

hope anybody can help

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



[PHP-DB] Re: OCIExecute very slow when Updating rows

2003-07-08 Thread Philippe Saladin

Philipp Krueger [EMAIL PROTECTED] a écrit dans le message
news: [EMAIL PROTECTED]

...
 but it still wouldn't work - when i comment OCIExecute out the script
works
 again - which is out of question of course since i need the damn script to
 execute.
 when i take the query and paste it in sqlplus to execute it manually
 everything goes as planned. i'm beginning to get desperate here... any
ideas
 why it won't work?

Sorry, I don't have an idea for you, but may be you would find help in the
document Making efficient use of Oracle8i thru Apache and PHP 4 :
http://conf.php.net/pres/slides/oci/paper.txt

Regards,
Philippe



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



RE: [PHP-DB] OCIExecute very slow when Updating rows

2003-07-08 Thread RENAULT, François

i think it's a usual transactionnal problem
i dont know what is your SQL update , but mostly the problem is there


-Message d'origine-
De : Krueger, Philipp [mailto:[EMAIL PROTECTED]
Envoyé : mardi 8 juillet 2003 09:13
À : '[EMAIL PROTECTED]'
Objet : [PHP-DB] OCIExecute very slow when Updating rows


hi there!

sorry for bothering but i can't help myself anymore. i've written a small
hardware-database for my company with a webinterfaced based upon php. now:
everything works just fine - selects, inserts - everything works except for
the damn updates! 

### CODE ###

$stmt = OCIParse($con,$query);
if(!$stmt){$error=$con? OCIError($con):OCIError();echo Error:
$error[code] $error[message]br;}
else{
OCIExecute($stmt,OCI_COMMIT_ON_SUCCESS);
$error = OCIError($stmt);
if ($error['code']){print Fehler:
[.$error['message'].];}}
OCIFreeStatement($stmt);
OCILogoff($con);

# ENDCODE #

i'm 100% sure everything is correct since sometimes the update DOES work - i
think it doesn't work anymore when there is the slightest activity on the
oracle-server (it's an  double cpu PowerPC RS64-IV running AIX Version 4.3
and Oracle 8.1.7.2) the server is BORED all the time but still the script is
not working... the script just times out 99 times and then for once it works
again.
the command which causes this delay is
OCIExecute($stmt,OCI_COMMIT_ON_SUCCESS);. i tried to change the code to

### CODE ###

OCIExecute($stmt,OCI_DEFAULT);
OCICommit($con);

# ENDCODE #

but it still wouldn't work - when i comment OCIExecute out the script works
again - which is out of question of course since i need the damn script to
execute.
when i take the query and paste it in sqlplus to execute it manually
everything goes as planned. i'm beginning to get desperate here... any ideas
why it won't work?

hope anybody can help

-- 
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] :: Vieatatissimo minori 18 anni ::

2003-07-08 Thread jvksexy-pornstar

http://allpornstar.coolhardcoresite.com

...meglio di Miss Universo

http://allpornstar.coolhardcoresite.com

...le ragazze più belle e SEXY del mondo
pronte a tutto, pur di essere PORNOSTAR


per non rivevere altri messaggi manda una
mail senza testo a: [EMAIL PROTECTED]

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



[PHP-DB] HEAP table

2003-07-08 Thread Terry Riley
I have a query that I would have liked to cache, but as it uses 
UNIX_TIMESTAMP and has a user variable in it, where cacheing won't work, I 
looked around for another way to do it (it is used to create a smallish  
50 records table on each web page, so any speed increase is worthwhile).

I decided to go for the creation of a HEAP table, so that anyone accessing 
the site would automatically access it. The existence of the table is 
tested for before initial creation by running a select against it and 
testing the $result variable.

This works, as far as it goes, but it will require occasional updating. 
And that's where I've come unstuck. How can I test for the time/date of 
the HEAP table's creation? If I can find that, then I can set a seconds 
value past which it should be dropped and recreated.

Any ideas?

Using MySQL 5.0.13, php 4.3.2 (on Windows XP), Apache 1.3 whatever. This 
also has to work on the website proper, using 5.0.13/4.3.1 and IIS5.

Terry Riley


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



Re: [PHP-DB] Re: PHP crashing with using Oracle (SOLVED... well, sorta)

2003-07-08 Thread Thies C. Arntzen
On Mon, Jul 07, 2003 at 03:58:45PM -0400, Reuben D. Budiardja wrote:
 Apparently there is a bug or something with OCI8 extention for PHP-4.3.2. 
 
 Using the same configuration and everything, I compiled PHP-4.3.1, and 4.2.3 
 and both worked. 
 
 I send e-mail to PHP-DEV wondering if this is a known bug that has been 
 reported before. So if anyone has the same experience, I would certainly like 
 to know. It's curious that no one has catch this, if that's really the case.

please add an 
#undef HAVE_OCI8_SHARED_MODE
in line 460 of oci8.c and recompile. also don't forget to
report back if that solved your problem!

re,
tc

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



[PHP-DB] Problems using Postgres

2003-07-08 Thread Jadiel Flores
Hi all, I really need your help asap, I have to change a website from mysql 
to postgres but this site is in spanish and Postgres is returning the error:

PostgreSQL said: ERROR: Unicode = 0x1 is not supoorted

This is everytime I try to insert the characters ñ, á, é, etc.

Do I need a special config for postgres?? can I solve it with php??

Thanks.

Jadiel Flores
-
http://www.abargon.com
[EMAIL PROTECTED]
(52-55) 52-29-80-34


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


[PHP-DB] formating results in seperate tables?

2003-07-08 Thread Aaron Wolski
Hi All,
 
Having some issues with the code below:
 
?php
 
}
 
?
tr valign=top

?php
 
 
$col = explode(,,$threadsColumn);
 
$col_search = (;
for ($i=0;$icount($col);$i++) {

$col_search .= $col[$i]. LIKE
'%$threadsName%';
if ($i != (count($col) -
1)) {
$col_search .=  OR ;
 }
}
 
$col_search .= );
 
$threadQuery = db_query(SELECT * FROM kcs_threads WHERE
$col_search GROUP BY id);
 
if (db_numrows($threadQuery) 0) {
 
for ($i=0;$threadResults =
db_fetch($threadQuery);$i++) {

 
?
td
table
width=340 border=0 cellspacing=0 cellpadding=0

 
tr
 
td class=adminThreadsDisplayText align=left?php echo
trimString($threadResults[manufacturer],13); ?brimg
src=../Graphics/spacer.gif width=85 height=2/td
 
td class=adminthreadsDisplayText align=center?php echo
$threadResults[colourID]; ?brimg src=../Graphics/spacer.gif
width=85 height=2/td
 
td class=adminthreadsDisplayText align=center?php echo
$threadResults[type]; ?brimg src=../Graphics/spacer.gif
width=85 height=2/td
 
td class=adminthreadsDisplayText align=centera
href=threadsedit.php?id=?php echo $threadResults[id]; if
($threadsColumn != ) echo threadsColumn=$threadsColumn; if
($threadsName != ) echo threadsName=$threadsName; ?font
class=adminEditLinkEdit/font/anbsp;nbsp;a
href=threadsdelete.php?id=?php echo $threadResults[id]; if
($threadsColumn != ) echo threadsColumn=$threadsColumn; if
($threadsName != ) echo threadsName=$threadsName; ?font
class=adminEditLinkDelete/font/abrimg
src=../Graphics/spacer.gif width=85 height=2/td
 
/tr 
/table
/td
tdimg
src=../Graphics/spacer.gif width=20 height=1/td
?php
 
if ($i%2) {

?
/tr
tr valign=top

?php
 
}
}
}
 
else {
 
?
td
class=adminNoResultsText colspan=3 align=centerbrbrThere Are
No Results Matching Your Search Criteria./td
?php
 
}
 
?
/tr
 
 
This is producing an additional tdimg src=../Graphics/spacer.gif
width=20 height=1/td within the tr/tr tags.
 
Any clues what's up?
 
Thanks!
 
Aaron


[PHP-DB] Delete constraint

2003-07-08 Thread Norma Ramirez - TECNOSOFT
Hi all, coul I delete a constraint made over a postgresql table? (In the parent 
table). The child doesn`t have records. By the way, does any one know a good 
postgresql administrator like mysqladmin??
Thank´s
Norma Ramirez



[PHP-DB] Weird Segfaults with Oracle, PHP, Apache2

2003-07-08 Thread Harris, Jeff

We're getting segfaults (11) when we try and execute a simple piece of
Oracle PHP code. This is a new installation and compilation of Apache2 and
we're just trying to see what is wrong. This particular code works on all of
our Apache 1.3 installations.

Versions: Redhat 8.0, PHP version 4.3.2, Apache version 2.0.46, Oracle
version 9i 9.2.0.1.0

We've worked through all of the oracle user issues with Apache, made sure
and set ORACLE_HOME and TNS_ADMIN.

the code we're executing is:

?php

echo 'here';
$conn = OCILogon(scott,tiger,db);
echo 'here2';

$stmt = OCIParse($conn, select original_system_reference, attribute8 from
apps.so_headers_interface_all where error_flag = 'Y');

echo 'here3';

OCIDefineByName($stmt, ORIGINAL_SYSTEM_REFERENCE, $order_number);
OCIDefineByName($stmt, ATTRIBUTE8, $attribute8);

OCIExecute($stmt);
echo 'here4';

while (OCIFetch($stmt)) {
echo 'here5';
  echo $order_number.;
  echo : .$attribute8.br;
}

echo 'here6';
  echo $order_number.;
OCIFreeStatement($stmt);
OCILogoff($conn);
echo 'here7';
?



The server segfaults right after it gets to here3. If you comment out
everything after here3, the page works fine. Running the $stmt select works
fine if you use sqlplus. I'm not sure why it's dying.


Has anyone seen anything like this?



---

Jeff Harris - Network Engineer
Golfsmith International, Inc.
CCNP, CCNA



Re: [PHP-DB] Delete constraint

2003-07-08 Thread Pascal Polleunus
Norma Ramirez - TECNOSOFT wrote:
Hi all, coul I delete a constraint made over a postgresql table? (In the parent table). The child doesn`t have records. 
I'm not sure to have correctly understood what you mean :-/
Anyway, to delete a constraint you need to use an ALTER TABLE command.
ALTER TABLE [ ONLY ] table
DROP CONSTRAINT constraint { RESTRICT | CASCADE }
/!\ The DROP CONSTRAINT constraint clause drops all constraints on the 
table (and its children) that match constraint.

More details on 
http://www.postgresql.org/docs/view.php?version=7.2idoc=1file=sql-altertable.html 

SQL commands supported by PostgreSQL (here for v7.2):
http://www.postgresql.org/docs/view.php?version=7.2idoc=1file=sql-commands.html

By the way, does any one know a good postgresql administrator like mysqladmin??
Check this URL: http://gborg.postgresql.org/browse.php?83

phpPgAdmin: http://phppgadmin.sourceforge.net
pgAdmin (for windows): http://www.pgadmin.org/
Thank´s
Norma Ramirez
Cheers,
Pascal


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