[PHP-DB] RV: Warning in ifx_connect() with PHP and Informix

2001-02-12 Thread alejandro . jose

> Hello,
> 
> I'm working in an intranet application with PHP and Informix.
> My problem comes when I obtain a WARNING from PHP like that:
> 
> Warning: E [SQLSTATE=IX 000 SQLCODE=-439]
> in ../funcionesBD.inc on line 64
> 
> The line shown above (64) includes an ifx_connect() statement from a
> (little) generic DB access library made from me from scratch. 
> This warning do not occurs always at the same line neither at the same
> function or web page. My code normally acts well, but sometimes (randomly)
> give me this serious warning. It usually occurs whe I've passed some time
> working with the applicaction, after doing 20 or 25 SELECTS for example.
> I'm totally sure I free all the conections and DB results. I've tried the
> ifx_pconnect() statement too.
> 
> My current configuration is:
> 
>  --> SUN OS 5.6
>  --> Informix 7.31.UC7
>  --> Informix Client SDK 2.40.UC1
>  --> PHP 4.0.3pl1
>  --> Apache 1.3.14
> 
> Thank you very much for your help and sorry for my awful english.
> 
>\|||/
>(o o)
> --ooO--(_)--Ooo-
> Alejandro José Jerez
> Ayuntamiento de Alicante - Servicio Central de Informática
> Tlf. (+34) 965 149 611 (Directo)
> 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] presentation to the list

2001-02-12 Thread alejandro . jose

Hello,
I'm new to the list and I would like to present myself.

My name is Alejandro and I'm a 25 years old engineer in computer science
from Alicante (Spain). In my current job, in my city council, I'm
programming (or trying to do so) an Intranet application under
PHP+Apache+Informix. This is the reason why I'm very interested in this
mailist.

Sorry form my very awful english.

See you in the list !
Alejandro.

>\|||/
>(o o)
> --ooO--(_)--Ooo-
> Alejandro José Jerez
> Ayuntamiento de Alicante - Servicio Central de Informática
> Tlf. 965 149 611 (Directo)
> 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 Newbie

2001-02-12 Thread Andris Jancevskis

Nothing best Oracle documentation CD, if You have experience in ANSI SQL
...
I'm working as system analyst with Oracle product having MS SQL SERVER
6.5 experience.

Some statement tuning and dba course will get some extra.

Andris

Tuesday, February 13, 2001, 9:07:47 AM, you wrote:

c> Hello everyone,

c> I was wondering if anybody would like to share real world experiences in 
c> development and deployment of oracle and php.  I'm extremely new to 
c> oracle & am in the early process of starting to map out a redesign & 
c> conversion of a site from postgres to oracle.  I am trying to get as 
c> much background oracle information as possible.   I've read the manual 
c> about the php oracle 8i function calls & have done some other web reading. 

c> I would appreciate any kind of thoughts in regards to challenges that 
c> people have faced with oracle & php..  My other question is will the php 
c> oracle 8i calls work with the oracle 9i.  Looks like 9i has some cool 
c> features, and would like to take advantage of them w/ our java components. 

c> We are using php & apache & are using java in the background application 
c> processes and other non-web server stuff. FYI, we are also currently 
c> using linux.


c> I am trying to get as much info since oracle is a huge beast, and want 
c> to do it right the first time around... so Thanks in Advance!

c> Chris

-- 
Andris Jancevskis
Systems Analyst,
Tieto Konts Financial Systems Ltd
Kr.Barona 32, Riga, LV1011, Latvia
tel: +371 7286660, fax: +371 7243000
mailto:[EMAIL PROTECTED]
http://www.konts.lv



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

2001-02-12 Thread cfrostrun

Hello everyone,

I was wondering if anybody would like to share real world experiences in 
development and deployment of oracle and php.  I'm extremely new to 
oracle & am in the early process of starting to map out a redesign & 
conversion of a site from postgres to oracle.  I am trying to get as 
much background oracle information as possible.   I've read the manual 
about the php oracle 8i function calls & have done some other web reading. 

I would appreciate any kind of thoughts in regards to challenges that 
people have faced with oracle & php..  My other question is will the php 
oracle 8i calls work with the oracle 9i.  Looks like 9i has some cool 
features, and would like to take advantage of them w/ our java components. 

We are using php & apache & are using java in the background application 
processes and other non-web server stuff. FYI, we are also currently 
using linux.


I am trying to get as much info since oracle is a huge beast, and want 
to do it right the first time around... so Thanks in Advance!

Chris


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




[PHP-DB] Problems with images in the db

2001-02-12 Thread Sunil Jagarlamudi

Hi,

I have inserted small images into the db and I am trying to echo them back
and when I do it, I keep getting the Header warnings.
How do I overcome that ? When I try to just echo the image it works fine,
but when I try to add a few more lines like echoing
other rows which have firstname and lastname of the people nothing comes out
besides the picture. If I change the positions then
I immediately get that Header was not the first line.

Any help is appreciated.

Thank You

Sunil

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

2001-02-12 Thread JJeffman

I'm afraid there is no articles on this matter. You are facing a database
design matter.

Auto-increment primary keys must haven't any meaning other than just be the
primary key and relate one table to another, if you had a function to
"update" the auto-increment field to eliminate the holes that function
should manage tables relationships as well. As you can see it'll be very
difficult to implement and probably slows down the script, imagine check all
related tables !

Although you have holes in the sequence, the order between the reminiscent
records will be the same .

Auto-increment fields should not be exposed to the user.

HTH.

Jayme.

http://www.conex.com.br/jjeffman





-- 
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] Running a TCL script from PHP

2001-02-12 Thread Noodles Grizzly

G'day,

I have a TCL script that reads one line from a file (generated by a php script),
checks it against an authoritive nameserver, then returns a one line value into
another file.  On it's own, the script work perfectly.  But I'm having trouble
including it in php code so that it executes during a loop.

Currently, I'm using the

exec(“checkdns.tcl”);

I’ve also tried

exec(“tclsh checkdns.tcl”);

It doesn’t appear to be running.  I’ve check permissions on the file and they
are all correct and I’ve even tried it giving permissions to absolutely everyone
to make sure.

Any ideas what I’m doing wrong?

Best Regards,
Bob Irwin
Domain & Server Admin
Planet Netcom


-- 
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] data from db

2001-02-12 Thread Jamie Alessio

> For instance, if I had a response to a question, called
> $row['description'], and I > searched for "%bryan%", the word
> 'bryan' would be a different color within the field $row['description']?
>
One way to do this:
Instead of directly outputting data to the browser using something like echo or
print you can store all of your output in a variable. You can then use
str_replace or ereg_replace to change the text to the color you want. For
example...

$search_word = "bryan";
$your_output = "The person searched for the word " . $search_word . ", so I want
to make it a different color";

$your_colored_output = str_replace($search_word, "" .
$search_word . "", $your_output);

echo $your_colored_output;

Something like that should do the trick (I haven't tested that code though).

- Jamie



-- 
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] help with PHP and mysql

2001-02-12 Thread Flaherty, James

I have redhat 7.0 with mysql loaded on my box

I use myphpadmin and I get this response



Warning: MySQL Connection Failed: Can't connect to local MySQL server
through socket '/var/lib/mysql/mysql.sock' (111) in db.php on line 60

Warning: MySQL: A link to the server could not be established in db.php on
line 60

Warning: Supplied argument is not a valid MySQL result resource in db.php on
line 61

Warning: Supplied argument is not a valid MySQL result resource in db.php on
line 74

Warning: No MySQL-Link resource supplied in db.php on line 75


what am I doing wrong  ???

Thank you
Jim


-- 
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] data from db[2]

2001-02-12 Thread bryan

nevermind.

i was having trouble with the str_replace (i saw where I said strstr, but I meant 
str_replace)..
I thought it should do what it did, and I finally got it!  

$edited_user = str_replace ($seperated[0], "$seperated[0]", $row['topic']);

thanks for your time!
bryan

Bryan Fitch
Programmer
Concept Factory
[EMAIL PROTECTED]
http://www.concept-factory.com

or my website
http://www.bryanfitch.com



[PHP-DB] data from db

2001-02-12 Thread bryan

To smarter people than I:

Umm, I have a search that is defined by several input fields.  Question at hand (and I 
have no idea if this is possible), is
there a way to highlight in my selection the word searched upon?

For instance, if I had a response to a question, called $row['description'], and I 
searched for "%bryan%", the word 'bryan'
would be a different color within the field $row['description']?

The closest thing I could come to would be strstr( ) function
this is just for convenienc not neccessity.

Thanks for your help
bryan

Bryan Fitch
Programmer
Concept Factory
[EMAIL PROTECTED]
http://www.concept-factory.com

or my website
www.bryanfitch.com





[PHP-DB] Virus alert

2001-02-12 Thread Alarion

Hey everyone,

In case no one has caught it yet, I think I remember seeing a couple emails
go through here this morning entitled "Here you have, ;o) " with an
attachment "disguised" as a jpg of Anna Kournikova. I rememebr seeing the
subject but I deleted it cause the subject didn't interest me. Anyhow, I
just read a post on one of the forums I frequent that was alerting everyone
of this.

The actual attachment is "AnnaKournikova.jpg.vbs"

I do believe all the major AV software vendors have updated their software,
but you should check to make sure.

If this is the wrong list, please forgive, but I could have swore it was
this one ;)

Regards,
Sean Finkel


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

2001-02-12 Thread Stinsman, Scott

can anyone figure out why the following code works fine when both select
variables = "ALL" and also when only 1 of the 2 ="ALL" but NOT when BOTH
select variables equal something other than "ALL"?

here is the code:

What area of the city would you like to dine in?
\n";
$select.="ALL\n";
while(list($AreaTemp)=mysql_fetch_array($mysql_result)) {   

$select.="$AreaTemp\n";

}

$select.="";
echo "$select";
  ?>
  
  What type of cuisine do you feel like?


\n";
$select.="ALL\n";
while(list($CuisineTemp)=mysql_fetch_array($mysql_result)) {

$select.="$CuisineTemp\n";

}

$select.="";
echo "$select";

?>

  

  
  
Scott Stinsman
Academic Coordinator
General Internal Medicine
1215 Blockley Hall
423 Guardian Drive
Philadelphia, PA  19104-6021
(phone)  215-662-7623
(fax)  215-349-5091
(email)  [EMAIL PROTECTED]


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




[PHP-DB] php mysql

2001-02-12 Thread Ramiro Radjiman

I have the following code:

$arr_aantal = explode (",", $aantal);
$arr_str_men = explode (",", $str_men);
$arr_recht = explode (",", $recht);
$arr_rechtverstek = explode (",", $rechtverstek);
$arr_verstekgelijk = explode (",", $verstekgelijk);
$arr_verstekongelijk = explode (",", $verstekongelijk);

for($b=0; $b<$rows; $b+=1){
$sql = "INSERT INTO " . $table_name . " SET aantal='" .
trim($arr_aantal[$b]) ."',str_men='" . trim($arr_str_men[$b]) ."',recht ='"
.
trim($arr_recht[$b]) ."',rechtverstek='" .
trim($arr_rechtverstek[$b]) ."',verstekgelijk='" .
trim($arr_verstekgelijk[$b]) ."',verstekongelijk='" .
trim($arr_verstekongelijk[$b])
."',soorten='$bewaar'";

mysql_query ($sql)
 or die ("cannot execute update query");
}

if i do this the following sql statement is created,


INSERT INTO testen SET aantal='22',str_men='2',recht
='2',rechtverstek='2',verstekgelijk='2',verstekongelijk='2',soorten='plat3mm
'
INSERT INTO testen SET aantal='',str_men='',recht
='',rechtverstek='',verstekgelijk='',verstekongelijk='',soorten='plat3mm'
INSERT INTO testen SET aantal='',str_men='',recht
='',rechtverstek='',verstekgelijk='',verstekongelijk='',soorten='plat3mm'
INSERT INTO testen SET aantal='',str_men='',recht
='',rechtverstek='',verstekgelijk='',verstekongelijk='',soorten='plat3mm'
INSERT INTO testen SET aantal='',str_men='',recht
='',rechtverstek='',verstekgelijk='',verstekongelijk='',soorten='plat3mm'
INSERT INTO testen SET aantal='',str_men='',recht
='',rechtverstek='',verstekgelijk='',verstekongelijk='',soorten='plat3mm'
INSERT INTO testen SET aantal='',str_men='',recht
='',rechtverstek='',verstekgelijk='',verstekongelijk='',soorten='plat3mm'


so the first array element goes wel, but the next contains no data, but i
know for sure that there is dat in it. See above.

Could anyone give me a clue?

aantal=$arr_aantal[$b]   should work i thaught.
or

 "aantal= ". $arr_aantal[$b] ." str_men=" . $arr_str_men[$b] . and so fort.



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

2001-02-12 Thread Matthias Kopolt

http://www.php.net/manual/en/function.ocilogon.php

tells you

int OCILogon (string username, string password [, string db])

so i assume that TEST is your User, web the password and pwd the
TNS-Identifier ?

I have a 8.1.6 DB (i guess thats what you have too), i#m using OCI8 libaries
and connecting to that remote server from more than 10!! different Machines
on the network, using PHP, JDBC and various Management Tools. It does work
believe me - Although sometimes it is difficult to set it, since there are
quite a few things that can go wrong.

the TNS names must match, (consider that a default_DOmain might be added
(sqlnet.ora))
the IP and Port of the remote DB have to match, as well as the Service or
the SID

ORACLE_HOME and sometimes some other ORA-Eniironments have to be set inside
apache or PHP or by explicity call.


mk


-Ursprüngliche Nachricht-
Von: Randall Barber [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 12. Februar 2001 18:37
An: [EMAIL PROTECTED]
Betreff: [PHP-DB] Oracle connectivity


There was a post a few days ago here that indicated that PHP could only talk
to Oracle databases if they resided on the same machine as the script
because PHP could not deal with the TNS resolutions or something to that
nature.

I have an Oracle database that I need to connect to on another machine (I'll
call it LIVE).

The tnsnames.ora has the appropriate entry in it for TNS resolution to an IP
connected database.
I used Net8 to create the DSN mapping.

When I use,
OCILogon("TEST","web","pwd");
I get a TNS resolution error (which I was able to FINALLY overcome), and now
I get "Could not connect to remote host." type error.

I am running WinNT 4.0 w/IIS, PHP4.

Now the reason I think its PHPs problem is because I can connect to the
database using ASP and VBScript.
I BELIEVE (not certain), that the client version I am running is 8.0.1.6.  I
am "assuming" (yikes) that the phpoci.dll is the one I needed, not the
phporacle.dll.  I have tried both and receive similar errors.  Even using
the ODBC component of PHP returns similar errors as above.

Any suggestions are welcome.
RDB


-- 
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 warning - how to get next seven days data from separate year, month, day fields

2001-02-12 Thread Timothy Wright

Hello all -

I have a PHP/MySQL calendar application that, for some reason, stores the
date in 3 separate fields: year, month, day.  What I need to do now is
create a dropdown menu that gets data for each of the next 7 days by day of
the week.  For example, if today is Monday, selecting Monday from the
select/option value dropdown would get data for today... selecting Friday
would get data for the next Friday.  What would be the easiest way to
accomplish this... should I extract 3 variables from date or timestamp and
then generate separate queries for each day??  Seems like there should be an
easier way.

Any help greatly appreciated

Tim Wright

:::
::: :::
:::   Timothy Wright:::
:::   mailto:[EMAIL PROTECTED]   :::
:::   Digital Network Enterprises   :::
:::   http://www.01network.com  :::
::: :::
:::   secure e-mail by request  :::
:::   (PGP signature and/or encryption) :::
:::


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

2001-02-12 Thread Randall Barber

There was a post a few days ago here that indicated that PHP could only talk to Oracle 
databases if they resided on the same machine as the script because PHP could not deal 
with the TNS resolutions or something to that nature.

I have an Oracle database that I need to connect to on another machine (I'll call it 
LIVE).

The tnsnames.ora has the appropriate entry in it for TNS resolution to an IP connected 
database.
I used Net8 to create the DSN mapping.

When I use,
OCILogon("TEST","web","pwd");
I get a TNS resolution error (which I was able to FINALLY overcome), and now I get 
"Could not connect to remote host." type error.

I am running WinNT 4.0 w/IIS, PHP4.  

Now the reason I think its PHPs problem is because I can connect to the database using 
ASP and VBScript.
I BELIEVE (not certain), that the client version I am running is 8.0.1.6.  I am 
"assuming" (yikes) that the phpoci.dll is the one I needed, not the phporacle.dll.  I 
have tried both and receive similar errors.  Even using the ODBC component of PHP 
returns similar errors as above.

Any suggestions are welcome.
RDB



RE: [PHP-DB] Here you have, ;o)

2001-02-12 Thread Matt Williams

fantastic

I never knew how to unsubscribe.

M@ 

> -Original Message-
> From: ajay arora [mailto:[EMAIL PROTECTED]]
> Sent: 12 February 2001 17:21
> To: php db
> Subject: [PHP-DB] Here you have, ;o)
> 
> 
> Hi:
> Check This!
> 
> 

-- 
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] Here you have, ;o)

2001-02-12 Thread ajay arora

Hi:
Check This!



-- 
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] Positioning into a query

2001-02-12 Thread Stas Trefilov

Hello, "Francesco Rossi"!
You wrote:

> Hi,
> After i have traverse a queryhow i can repositioning my 
> cursor to the first
> record of the query ?

While traversinq, put records in array, then work with it.

-- 
Piloteers do it on the road


-- 
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] Linux+PHP+Infomix....

2001-02-12 Thread Marko Perich

Hi. Here is how I did it.

1.- Download and untar apache and php sources. I use apache_1.3.12.tar.gz
and php_4.0.2.tar.gz
2.- Download informix client (esdk240uc1_linux.rpm) from informix.com (write
down S/N and ACT. KEY)
3.- Uninstall apache
4.- Create informix user, group informix.
5.- in /etc/profile, export INFORMIXDIR=/opt/informix
6.- rpm -i esdk240uc1_linux.rpm
7.- install & config apache & php
apache_1.3.12# ./configure --prefix=/usr/local/apache
apache_1.3.12# export PATH=$PATH:/opt/informix/bin
php_4.0.2# ./configure --prefix=/usr/local \
--with-apache= ../apache_1.3.12 \
--enable-track-vars --anable-sid \
--with-informix=/opt/informix
php_4.0.2# make
php_4.0.2# make install
apache_1.3.12# ./configure \
--activate-module=src/modules/php4/libphp4.a \
--enable-module=php4 \
--prefix= /usr/local/apache \
--enable-module=so
apache_1.3.12# make
apache_1.3.12# make install
php_4.0.2# cp php.ini-dist /usr/local/lib/php.ini
add server config into /opt/informix/etc/sqlhosts
append to /usr/local/apache/conf/httpd.conf
SetEnv INFORMIXDIR /opt/informix
SetEnv INFORMIXSERVER 
add to /etc/services
sqlexec1545/tcp
add to /etc/profile
export INFORMIXDIR=/opt/informix
export INFORMIXSERVER=
export PATH=$PATH:/opt/informix/bin

Hope it helps.
Marko


-Mensaje original-
De: Javier Morquecho Morquecho <[EMAIL PROTECTED]>
Para: 'php-db list' <[EMAIL PROTECTED]>
Fecha: Viernes, 09 de Febrero de 2001 13:14
Asunto: RE: [PHP-DB] Linux+PHP+Infomix


>
> Come on boys!, you always know everything.help me, please...
>
>-Mensaje original-
>De: Javier Morquecho Morquecho [mailto:[EMAIL PROTECTED]]
>Enviado el: Viernes 9 de Febrero de 2001 8:30 AM
>Para: 'php-db list'
>Asunto: [PHP-DB] Linux+PHP+Infomix
>
>
>Hi...
>
> I have worked with linux+php+postgreSQL and linux+php+MySQL, no problem.
>
> I'm just starting to use informix database, how can I install the informix
>support on my
>apache server??, I have been looking for something like a RPM file, but I
>can't find any
>information
>
> Any tip how can I to start?, or where can I looking for?
>
>Thanks 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]


-- 
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] informix: inserting long chars via php3

2001-02-12 Thread Udo Oehmig

hi,

we work with php 3.0.14 and try to insert texts into char(500) fields in an
informix 7.2 database. but, there is always the following error:

"Warning: Prepare fails (E [SQLSTATE=IX 000 SQLCODE=-280]) in db.inc.php3 on
line 21"

that error code -280 means: "A qouted string exceeds 256 bytes"

i tried the same thing with informix 4gl - and it was possible to have a
quoted string longer than 256 bytes...

does anyone know this problem? could it be solved? is it a problem of the
php informix driver or a problem of the database erver?

thanx

-udo


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

2001-02-12 Thread Marios Moutzouris

>Will my db2 connection (using odbc_connect and the CLI driver) close >when the script 
>ends, or should I always call odbc_close?

It should. otherwise if something goes wrong in the script, then connection still open.

One of the disadvantages of pconnect. Ended up DOS'ing the AS400 ;-)

marios

_
Valentines Day Special Offer:
1 Dozen Long Stemmed Red Roses including a FREE box of Cadbury's Milk Tray for only 
R199.
Place your order before the 5th of February and get FREE delivery. 
http://www.netactive.co.za/linktrack/track.asp?rc=nflpe
Message Sent Using NetActive Personal
_


-- 
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]Question on select..for update

2001-02-12 Thread Richard Halford

Hi, just started on the list, and the didn't seem to get through the first
time, so I'll give it another whirl.

I'm trying the following code based on a modded db_oci8.inc (the mod is so
that the call to OCIExecute always passes OCI_DEFAULT rater than
OCI_COMMIT_ON_SUCCESS.

This is a snippet of the relevant code:

The variable $PartNumber contains the part number to query on:

  $db->Query("select part_nbr "
 ." from psns "
 ." where part_nbr = '".$PartNumber."' "
 ." for update ");
  $db->next_record();
?>alert ("Waiting with record lock")Query("lock table psns in exclusive mode");
?>alert ("Waiting with table lock")Query("update psns set user_id = '' where part_nbr =
'".$PartNumber."' ");
  $db->Query("commit");

The problem is that between the firt select query and lock table there
should be a record lock on the requested record. Now opening up a SQLPlus
session I can perform an update on that record. If, from SQLPlus, I try and
lock the table or do a select for update, then this the locking works fine
and there is no problem, so I know it is not an oracle related problem
becuase of this.

I've tried this also with the OCI8 libraries and the same problem occurs.
What I don't understand is why this should occur, after all its just passing
SQL queries through and not doing anything else flash.

Between the table lock and the update the lock should also be placed at
table level, yet there is still no lock applied.


The results in debug mode are :

Obtained the Link_ID: Resource id #3
Debug: commit mode = 0 COMMIT On success = 32 Default = 0 (this is just to
check that the mode is OCI_DEFAULT)
Debug: query = select part_nbr from psns where part_nbr = 'XX' for
update
[PART_NBR]:XX
Debug: commit mode = 0 COMMIT On success = 32 Default = 0
Debug: query = lock table psns in exclusive mode
returned Debug: commit mode = 32 COMMIT On success = 32 Default = 0 (this is
just to check that the mode is OCI_DEFAULT)
Debug: query = update psns set user_id = '' where part_nbr = 'XX'

Regards,
  Richard Halford


-- 
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] rewriting this query to remove IN

2001-02-12 Thread Bob Hall

>Hi Guys,
>
>I understand that as of version 3.24, MySQL will support subselects. But
>untill then (because 3.23 is the latest stable release) I need to convert
>this SQL satement into something that can be used with v3.2? - the version
>just before the latest release.
>
>$search = "SELECT count(search_table.word) as score,
>search_table.qid,page_data.contents
>  FROM search_table,page_data
>  WHERE page_data.pID = search_table.qid AND search_table.word
>  IN($querywords)
>  GROUP BY search_table.qid
>  ORDER BY score DESC";
>
>Does anybody have any ideas, thanks for this guys. Any help is much
>appreciated.
>
>Scott Mebberson

Sir, I can't offer suggestions without knowing what the subquery is.

Bob Hall

Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak

-- 
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] php client --> informix-se

2001-02-12 Thread Paul Gardiner

Hello Luigi,

I'm afraid before you're able to use the informix database it will have to
be upgraded to at least version 7.x. We have SCO Openserver 5.0.4 running
the Informix SE 7.2 with PHP4 and Apache and all works well. We too have an
NT server but would not even entertain the idea of running the web server
from there. For us the unix box is so much more reliable.

Regards,
- Paul -

- Original Message -
From: "Luigi Casiraghi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 09, 2001 10:10 PM
Subject: [PHP-DB] php client --> informix-se


> Dear all,
>
> I have a  question for you.
>
> Given the following configuration:
>
> - One NT machine with Apache 3.14 and php4 (from www.php4.de) installed
>(the one that should act like client)
> - One Sco_SV system Release 3.2v5.0.5 with INFORMIX-SE Version 5.10.UD1
>(the server)
>
> Are my SCO-UNIX Release and INFORMIX-SE Version  suitable for use
> with PHP4 ?
>
> I would like to create php4 scripts that connect from the NT machine
> to the Informix Server, execute query, etc to diplay formatted data
> throught Apache.
>
> PHP has been configured to use the php_ifx.dll but when I execute
> a simple script with only phpinfo() to see php configuration I receive
> the following message:
>
> "can't find the dinamyc library isqlt09a.dll in the specified path"
>
> and as a consegunce
>
> "cant load php_ifx.dll..."
>
> the fact is that there isn't the file isqlt09a.dll on the NT system.
>
> what file is it ?
>
> What are the pieces I need to complete the puzzle and where can I get
> them ?
>
> a great thanks in advance to everyone that can give me an help.
>
> bye,
>
> Luigi Casiraghi
> [EMAIL PROTECTED]
> Italy
>
>
> --
> 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]