[PHP-DB] Re: php and db/c

2003-01-03 Thread Mark Newnham
[EMAIL PROTECTED] wrote:

Hello everyone,
We are running an old database system called db/c and attempting to access 
the information via php. We have managed to make an odbc connection to the 
databases, and can successfully retrieve the field names, and field counts. 
However, php insists the tables are empty, returning -1 (empty set) for the 
odbc_num_rows(). When we make a raw odbc connection to run a direct sql query 
on the data, it all shows up fine. There is some miscommunication between odbc 
and php that is eluding us. Any input or suggestions would be welcomed.
Thank you,
Jay Merritt
[EMAIL PROTECTED]
Many odbc drivers do not return the correct value for odbc_num_rows. 
Have you tried odbc_result_all to see what comes back?


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



RE: [PHP-DB] Database Connection

2002-02-05 Thread Mark Newnham

You need to specify some env variables before you connect: heres what I do.

#

 putenv("LD_LIBRARY_PATH=/home/db2inst1/sqllib/lib");  
 putenv("DB2INSTANCE=db2inst1");   

#

HTH

Mark


-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 05, 2002 9:43 AM
To: Jerry; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Database Connection


Jerry,

I believe it's the sqllib dir, but you can try the other or experiment with
just /home/db2inst1/sqllib
If created by the DB2 client installer, try applying the environment
variables script: . /home/db2inst1/sqllib/db2profile

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access & Data Integration Technology Providers

> -Original Message-
> From: Jerry [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 05, 2002 11:36 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Database Connection
>
>
> Thanks Andrew for your answer.
>
> In the environment variables I have already:
>
> DB2INSTANCE=db2inst1
> LD_LIBRARY_PATH=:/home/db2inst1/sqllib/lib
>
> Is it correct ? Or does it need to point to the DB2 Client directory
> /usr/IBMdb2/V7.1/lib
>
>
> Thanks.
>
> Jerry
>
>
> "Andrew Hill" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Jerry,
>
> > Installing DB2 Client will allow you to use the ODBC functions
> in PHP, but
> > be aware that you are not actually using any ODBC Drivers in this
> instance.
> > PHP allows hiding of certain database specific functions under
> a "Unified
> > ODBC" that uses the ODBC functions without using true ODBC database
> communication.
>
> > That being said, you don't need to link --with-iODBC unless you
> are using
> > ODBC Drivers, so it's not an issue here.
>
> > If Apache doesn't start, I'd check it's logs, but you might be
> encountering
> > a situation where the DB2 libraries were in the path at compile time and
> are
> > not at Apache start time.  Try setting LD_LIBRARY_PATH environment
> variable
> > to include the location of your DB2 Client.
>
> > Andrew Hill
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> .
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>



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

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




RE: [PHP-DB] Can't unserialize array from mysql

2001-12-03 Thread Mark Newnham

Either 

1. Don't addslashes before you serialize it
2. use stripslashes before you unserialize it

> -Original Message-
> From: Jim Doolittle [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 03, 2001 9:07 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Can't unserialize array from mysql
> 
> 
> Hi,
> 
> I'm trying to loop thru an unserialized array pulled from 
> mysql. First I
> serialized the array before storing it:
> 
> --
> --
> 
> $sql ="UPDATE $table_name set performer_id='" . 
> addslashes(serialize($perfor
> mer_id)) . "' WHERE lineup_id=$lineup_id";
> 
> --
> --
> 
> This seems to work. mysql stores $performer_id as:
> 
> a:3:{i:0;s:2:"12";i:1;s:1:"1";i:2;s:1:"3";}
> 
> The next time I grab $performer_id from mysql I want to 
> unserialize it and
> loop thru it with foreach():
> 
> --
> --
> 
> $sql ="SELECT performer_id FROM lineup WHERE lineup_id=$lineup_id";
> 
> $result_pid = @mysql_query($sql, $connection) or 
> die("Couldn't execute query
> perfomer ID.");
> while ($row = mysql_fetch_row($result_pid)) {
> $result_pid = unserialize($result_pid);
> 
> foreach ($result_pid as $performer_id) {
> (some more code here)
> }
> --
> --
> 
> But this gives me an error "Warning: Invalid argument supplied for
> foreach()". I used var_dump before and after I unserialized 
> just to check
> that the result set actually contained data.
> 
> The first var_dump produced "array(1) { [0]=> string(44)
> "a:3:{i:0;s:2:"10";i:1;s:1:"6";i:2;s:2:"17";}" }". Looks 
> good, but var_dump
> after unserializing gives "bool(false)".
> 
> I also tried using reset() after the first var_dump, and 
> stripslashes(), but
> got the same error. Can anyone see what I'm doing wrong? Thanks!
> 
> 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 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] Variables in a loop

2001-10-29 Thread Mark Newnham

http://www.php.net/manual/en/language.variables.variable.php

> -Original Message-
> From: LeTortorec, Jean-Louis [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 29, 2001 2:04 PM
> To: '[EMAIL PROTECTED]'
> Subject: [PHP-DB] Variables in a loop
> 
> 
> I'm trying to write a loop to read variables I receive from a form:
>  
> 
> 
>  
>  
> 
>  
>  
> I'd like to get something like:
>  
> for ($i=1; $i<=10; $i++) { $tab[$i]="a".$i ;}
>  
>  
> The expression "a".$i is actually a string, not a variable.  
> Any idea how to
> "read" the value of that string?
>  
> Thanks for your help.
>  
> Jean-Louis
>  
>  
>  
>  
> 

-- 
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] Performance problems in NC

2001-10-29 Thread Mark Newnham

This could be due to missing tags such as /body and /html

> -Original Message-
> From: Andy [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 29, 2001 6:41 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Performance problems in NC
> 
> 
> Hi there,
> 
> I have problems with the performance while using NC. It 
> workes fine with IE.
> As soon as I access the db. It takes aproximatelly 1 -2 min 
> till I see the
> page.
> 
> Does anybody know some help?
> 
> Thank you
> 
> Andy
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 

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




RE: [PHP-DB] DB2 Performance issue - More Info

2001-10-02 Thread Mark Newnham

>From the IBM CLI Reference:

SQL_ATTR_ODBC_CURSORS (DB2 CLI v5) 
This connection attribute is defined by ODBC, but is not supported by DB2
CLI. Any attempt to set or get this attribute will result in an SQLSTATE of
HYC00 (Driver not capable). 

A 32-bit option specifying how the Driver Manager uses the ODBC cursor
library. 

So I guess this means the message below was related to using a 3rd party
odbc driver.

Shucks..


Regards

Mark


> -Original Message-
> From: Mark Newnham [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 01, 2001 3:33 PM
> To: '[EMAIL PROTECTED]'
> Subject: [PHP-DB] DB2 Performance issue
> 
> 
> This was posted on the newsgroup a couple of months ago:
> 
> 
> Christian Szardenings wrote:
> > 
> > Hi Andrew,
> > 
> > thanks a lot for your help. Today we discovered what
> > our real problem was:
> > 
> > After "playing" a little bit with the php-scripts that try
> > to connect to the IBM DB2, we set the optional parameter
> > Cursortype when calling odbc_pconnect().
> > 
> > And the exciting thing: When we set the cursor type
> > to SQL_CUR_USE_ODBC Cursor Type, then
> > the whole query speed up from 1 till 10 seconds
> > to 0.2 till 0.3 seconds for 100 records. Amazing!!!
> > 
> > Therfore, PHP is just almost fast as calling the DB2
> > from Servlets using JDBC (don't take too much care
> > about the speed at whole: the database was on a
> > completely other location, so the whole connection
> > was made over a slow network connection).
> > 
> > I hope this helps when other encounter the same
> > problem when trying to connect to DB2 from
> > PHP.
> > 
> > Kind regards,
> > Christian Szardenings
> 
> This posting has caused some discussion amongst some of us 
> who are trying to
> use DB2 in Native mode (i.e. using Unified ODBC) as the IBM 
> driver manager
> appears not to support this parameter. ( An odbc connect with 
> the specified
> parameter returns [IBM][CLI Driver] CLI0150E Driver not capable.
> SQLSTATE=S1C00
> 
> Could the author or anyone else who knows, please clarify 
> this posting if
> they are using unified odbc or perhaps a third party ODBC driver.
> 
> 
> TIA
> 
> Mark
> 
> -- 
> 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] DB2 Performance issue

2001-10-01 Thread Mark Newnham

This was posted on the newsgroup a couple of months ago:


Christian Szardenings wrote:
> 
> Hi Andrew,
> 
> thanks a lot for your help. Today we discovered what
> our real problem was:
> 
> After "playing" a little bit with the php-scripts that try
> to connect to the IBM DB2, we set the optional parameter
> Cursortype when calling odbc_pconnect().
> 
> And the exciting thing: When we set the cursor type
> to SQL_CUR_USE_ODBC Cursor Type, then
> the whole query speed up from 1 till 10 seconds
> to 0.2 till 0.3 seconds for 100 records. Amazing!!!
> 
> Therfore, PHP is just almost fast as calling the DB2
> from Servlets using JDBC (don't take too much care
> about the speed at whole: the database was on a
> completely other location, so the whole connection
> was made over a slow network connection).
> 
> I hope this helps when other encounter the same
> problem when trying to connect to DB2 from
> PHP.
> 
> Kind regards,
> Christian Szardenings

This posting has caused some discussion amongst some of us who are trying to
use DB2 in Native mode (i.e. using Unified ODBC) as the IBM driver manager
appears not to support this parameter. ( An odbc connect with the specified
parameter returns [IBM][CLI Driver] CLI0150E Driver not capable.
SQLSTATE=S1C00

Could the author or anyone else who knows, please clarify this posting if
they are using unified odbc or perhaps a third party ODBC driver.


TIA

Mark

-- 
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: PHP vs. 2 database softwares

2001-10-01 Thread Mark Newnham

When i was switching back and forth between those 2 environments, I had to
remove the config.cache file before doing a 'configure' in order to make it
compile correctly.

> -Original Message-
> From: Scott Fletcher [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 01, 2001 1:50 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Re: PHP vs. 2 database softwares
> 
> 
> Well, I did that.  I typed in
> "./configure --with-iodbc=/usr/local/odbcsdk 
> --with-ibm-db2=/usr/lp/db2_06_0
> 1" and it can compile without a problem.  However, I checked 
> the result of
> the configure and it didn't display the iodbc for some 
> reason.  So, that's
> why the iodbc was not compiled with PHP.  I did have hte environment
> variable specified correctly.  I tried to test it to see if 
> it work if I do
> the configure command without hte ibm db2 option and it can 
> see the iodbc.
> So, when I put the iodbc option back in, it can not see the 
> iodbc.  Why is
> that?  I do not know?  I'm using PHP-4.0.6
> 
> Scott
> 
> 
> "John Lim" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I have connected simultaneously to interbase, mysql, 
> postgresql, oracle,
> > mssql, microsoft access, foxpro in one script.
> >
> > You just configure PHP to be compiled with multiple 
> database options.
> > Simple.
> >
> > - John
> >
> > "Scott Fletcher" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > Hi!
> > >
> > > I found that PHP can be compiled and work with only 
> one database
> > > software.  You won't be able to have PHP to work with 2 seperate
> database
> > > softwares.  (You can compile it but it will work only 
> with one databse
> > > software, not both, no matter what).  I checked the php 
> "./configure"
> file
> > > and found that it is not design to include 2 seperate 
> databases when you
> > > want it to.
> > >
> > > Man, it would be very nice to have PHP to work with multiple
> database
> > > softwares.  The only way you can have PHP to work with more than 1
> > database
> > > softwares, then you would need to compile PHP & Apache to 
> work with one
> > > database.  Then re-configure and re-compile PHP & Apache 
> to a seperate
> > > directory.  That way, you will have 2 apaches and run 
> them together.
> > There
> > > is no other way!
> > >
> > > Thanks,
> > >  Scott
> > >
> > >
> >
> >
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 

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




[PHP-DB] Windows DLL extension for DB2 needed

2001-10-01 Thread Mark Newnham

Does anyone have a dll extension to enable access to DB2 from PHP 4? I don't
have access to a Windows compiler.


TIA

Mark

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




RE: [PHP-DB] Storing code in a mysql database

2001-09-19 Thread Mark Newnham

I've now progressed to the point where I'm not getting eval errors. The next
problem is that is doesn't substitute the variable names: so the code 

$company_code=1;

eval($sql='select * from vehicle where company=$company_code';");

ends up $sql equal to 'select * from vehicle where company=$company_code' 

and not 'select * from vehicle where company=1'

Any clues?

TIA

Mark

> -Original Message-
> From: Mark Newnham [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 19, 2001 2:54 PM
> To: '[EMAIL PROTECTED]'
> Subject: [PHP-DB] Storing code in a mysql database
> 
> 
> I'm trying to store SQL code in a blob field in a mysql 
> database, but i'm
> having a problem.
> 
> The code looks like this "$sql='select * from vehicle where
> company=$company_code';";
> 
> After I retrieve it from the db i eval() it to get the result.
> 
> I can make this work if i store the code in a variable, but 
> not if i store
> it in a database table and retrieve it. I am sure i am 
> missing the right
> combination of addslashes/striplashes etc.
> 
> can anyone help on this problem?
> 
> -- 
> 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] Storing code in a mysql database

2001-09-19 Thread Mark Newnham

I'm trying to store SQL code in a blob field in a mysql database, but i'm
having a problem.

The code looks like this "$sql='select * from vehicle where
company=$company_code';";

After I retrieve it from the db i eval() it to get the result.

I can make this work if i store the code in a variable, but not if i store
it in a database table and retrieve it. I am sure i am missing the right
combination of addslashes/striplashes etc.

can anyone help on this problem?

-- 
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] Proper Case Conversion

2001-08-16 Thread Mark Newnham

ucfirst(strtolower($field));

> -Original Message-
> From: Keith Spiller [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 16, 2001 12:41 PM
> To: Php-db
> Cc: MySQL
> Subject: [PHP-DB] Proper Case Conversion
> 
> 
> Hello,
> 
> I'm reading data from a mysql table that is entirely in 
> uppercase letters.  I'd very much like to convert them
> to lowercase.  After searching a while, I found that there is 
> are php commands to convert text strings between
> upper and lower case, but I was unable to find anything that 
> can convert to proper case.
> 
> Does any one know of a way to do this, or a script that will 
> accomplish it?  Or, is there a mysql command
> that can handle the matter for me?
> 
> Thanks,
> 
> 
> Keith
> 

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




RE: [PHP-DB] PHP x Progress

2001-07-23 Thread Mark Newnham

Yes, ODBC - If you are using unix, i recommend the openlink MT drivers
(www.openlinksw.com) There is no native mode interface available for
PROGRESS.

> -Original Message-
> From: André [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 23, 2001 11:42 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] PHP x Progress
> 
> 
> How I can access a Progress database? ODBC?
> 
> 
> 
> -- 
> 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] using ADODB db class

2001-07-10 Thread Mark Newnham

Not sure if this is really the right list to ask on, so please excuse me. 

I am trying to use the adodb db class with php4/mysql. On problem i have hit
is that if i retrieve 2 tables with a join and the 2 tables both have a
field of the same name, the command

$result->fields("fieldname") always returns the value of the second field of
that name.

i could loop through the fields via index, then use fetchfield() to retrieve
the name, but generically, I would also like to retrieve the table that the
field is attached to. Does anyone know of a way to do this or a command that
has this option?

Thanks

Mark

-- 
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] Problems with PHP / Progress / ODBC

2001-05-08 Thread Mark Newnham

Progress databases prefer the odbc_prepare, odbc_execute sequence over the
odbc_exec functions ( I don't know why )

> -Original Message-
> From: indrek siitan [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 08, 2001 11:38 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [PHP-DB] Problems with PHP / Progress / ODBC
> 
> 
> Hi,
> 
> I'm trying to write a PHP app that accesses a Progress database.
> 
> version info:
>  - Windows 2000 Pro + Apache 1.3.14
>  - PHP 4.0.4pl1 (4.0.5 just wouldn't work on my machine)
>  - Progress 8.3.B
>  - Merant Progress ODBC drivers v 3.50
> 
> the ODBC drivers seem to be fine - I made a MS Access database
> and linked a bunch of Progress tables in there with Get External
> Data / Link tables. I can view/query them just fine.
> 
> now, I tried a simple PHP app:
> 
>  --- 8< ---
> 
>$DBH=odbc_connect("mgauto","","","");
>   $sth=odbc_exec($DBH,"SELECT Trkoodi,Trnimi FROM Turyhma"); 
>   while(odbc_fetch_row($sth))
>   {
> echo " ".odbc_result($sth,"Trkoodi")." - 
> ".odbc_result($sth,"Trnimi");
>   }
>   odbc_close($DBH);
> ?>
> 
>  --- 8< ---
> 
> The odbc_exec() query seems to be fine (when i do "echo $sth" after
> the exec, i get "Resource id #2"). but the odbc_fetch_row() really
> acts weird - it always returns true so it ends up in endless loop.
> the odbc_result() calls return empty strings.
> 
> I've tried the odbc_connect() with all the possible cursor types,
> doesn't help.
> 
> I've tried something like that:
> 
>  --- 8< ---
> 
> $i=1;
> while(1)
>  {
>   if (!odbc_fetch_row($sth,$i)) break;
>   echo " ".odbc_result($sth,"Trkoodi")." - 
> ".odbc_result($sth,"Trnimi");
>   $i++;
>  }
> 
>  --- 8< ---
> 
> didn't work either. :(
> 
> 
> as a really stoopid thing, I tried creating an ODBC source for the
> Access database I created before (with the Progress tables linked
> in via ODBC). now I connected to the Access database via ODBC in
> PHP and tried to query the Progress tables linked into the Access.
> everything worked fine - I could access all the information in
> Progress.
> 
> 
> any other ideas?
> 
> 
> Rgds,
>   Tfr
> 
>   --==< [EMAIL PROTECTED] >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==-- 
> 
> -- 
> 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] odbc_tableprivileges help required

2001-05-02 Thread Mark Newnham

Could someone supply simple examples of how this command works. I am trying
to use it like this -

$conn=odbc_connect("poinv","","");
$result=odbc_tableprivileges($conn,"pt_mstr","%","%");
odbc_result_all($result); 

but this returns 

Warning: SQL error: , SQL state 0 in SQLTablePrivileges in
/opt/apache/lib/htdocs/poinv/test.php on line 9
Warning: Supplied argument is not a valid ODBC result resource in
/opt/apache/lib/htdocs/poinv/test.php on line 11

So my understanding of this is obviously incorrect

Thanks

Mark

#####
Mark Newnham
Application Design Associates, Inc
6021 S.Syracuse Way #302
Englewood, CO 80111, USA

http://www.adacorp.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] File Optimisation

2001-03-14 Thread Mark Newnham

The first thing I would look at ( having had the same issue ) is whats
actually in the document. I managed to reduce the size of data delivered by
60% by 2 methods.

1. Ruthless use of css in table formatting. 
2. Creating javascript functions for even the smallest inline feature such
as mouseovers.

Regards 


Mark

> -Original Message-
> From: Steve Brett [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 14, 2001 4:02 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] File Optimisation
> 
> 
> I have a calendar system that details the appointments for various
> departments in the company and am having problems with the 
> sheers size of
> the html docs that are returned.
> 
> One department insists that they nned to see all the users in 
> one go (approx
> 110) and the calendars for 3 months.
> 
> This causes an html doc being returned frm the server that is 3.5 meg.
> Whilst is takes the server 4 seconds to build and deliver this I was
> wondering if there is any way to speed things up and reduce 
> the amount of
> network traffic.
> 
> Would zipping the file b4 it is sent be a good (and easy) way to go ?
> 
> Thanks in advance,
> 
> Steve Brett 
> Internal Development 
> EMIS Ltd. 
> "Privileged and /or Confidential information may be contained in this
> message. If you are not the original addressee indicated in 
> this message (or
> responsible for delivery of the message to such person), you 
> may not copy or
> deliver this message to anyone. In such case, please delete 
> this message,
> and notify us immediately. Opinions, conclusions and other information
> expressed in this message are not given or endorsed by my 
> firm or employer
> unless otherwise indicated by an authorised representative 
> independently of
> this message."
> 
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 

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




[PHP-DB] Problem with odbc_field_type?

2001-03-05 Thread Mark Newnham

Is there a problem with odbc_field_type? I always receive a null back. I
dont have a problem with odbc_field_len. Is it perhaps that some db types
don't respond correctly.

Thanks

Mark

-- 
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] Redirect command?

2001-02-22 Thread Mark Newnham

if ( $x==true) {
print "\n";
print "window.open('b.php','_self');\n";
print "\n";
die;
}


> -Original Message-
> From: Julio Cuz, Jr. [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 22, 2001 3:23 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Redirect command?
> 
> 
> Hi--
> 
> I've been looking for a "redirect" command (basically 
> redirect from page a 
> to page b if something happens)...
> 
> Julio Cuz, Jr.
> Riverside Community College
> [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] SELECT problem (2)

2001-02-22 Thread Mark Newnham

You probably want 

this.options[this.selectedIndex].value



> -Original Message-
> From: Julio Cuz, Jr. [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 22, 2001 2:36 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] SELECT problem (2)
> 
> 
> Hi--
> 
> Sorry, I forgot to finish the previous e-mail:  What's wrong 
> with this line?
> 
> echo(" onChange=\"window.location=\"$PHP_SELF?campus+=\"this.value\"\"\"
> NAME='campus'>");
> 
> I'm trying to RELOAD the current page with the new value of 
> "$campus" after 
> the user selects a campus from a drop-down menu.  But I can't get the 
> "this.value" line to pass the value of "$campus" to the new 
> loaded page.
> 
> Help!
> 
> 
> 
> Julio Cuz, Jr.
> Riverside Community College
> [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] Windows 2000 follow up

2001-02-19 Thread Mark Newnham

> Also i hear 
> that running a server on windows 2000 is just as good if not 
> better then unix.. 

Oh god, let's not get started on that..

-- 
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] runing a query and a another task at the same time

2001-02-19 Thread Mark Newnham

I may be mistaken, but I believe that something as simple as calling a
javascript window.open function effectively starts a parallel process, i.e.
it is a non-blocking operation in a browser

heres the sample code i used to test it.

1. A frameset with 2 frames, A and B. frame A has src=test1.php 

2. test1.php

  
window.open('test2.php','B');
   
"; }

?>   

2. test2.php

   
"; }

?>  
~

The programs definitely run concurrently, and a quick view of my apache
processes shows that 2 processes are being used by the program.

HTH

Mark



> -Original Message-
> From: Pedro M. S. Oliveira [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 19, 2001 6:02 PM
> To: PHP db
> Subject: [PHP-DB] runing a query and a another task at the same time
> 
> 
> hello all!
> i was wondering how to do a php script that works like this.
> 
> i need to make an update to a database but at the same time i 
> need to make a
> query to another database.
> the update and the query doesn't have anything to do with 
> each other, they
> just need to run both in a paralel way.
> i was wondering how to do this with php in a NT box, i can 
> also use a Linux
> box but the ultimate end i'll have to use NT (Grrr).
> 
> this may seam confuse but the thing i wanna do is like 
> paralel tasking,
> butting a function running on the background till its over and in the
> meanwhile another function that doesn't need the first 
> function to end to
> start..
> thank you all
> 
> 
> 
> 
> ***
> Pedro Miguel Silva Oliveira
> Cell Phone: +351 96 5867227
> SMS: [EMAIL PROTECTED]
> 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 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 and PROGRESS

2001-01-29 Thread Mark Newnham

suggest you subscribe to the webspeed/servers/sql92 (depending on your
progress version) list at www.peg.com, which is where the progress/php
discussions/arguments are voiced...

> -Original Message-
> From: Hector Banda [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 29, 2001 4:55 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] PHP and PROGRESS
> 
> 
> Hi all,
> Any information about how to make PHP to work with PROGRESS databases?
> 
> Thanks,
> 
> 
> ==
> Hector M BandaVoice:  (949) 784-3143
> Progress Programmer/Analyst Fax:  (949) 784-3443
> Draper's & Damon's -- 9 Pasteur -- Irvine Ca, 92618
> ==
> 
> 
> -- 
> 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] SQL/ODBC query returns two variables of same name

2001-01-29 Thread Mark Newnham

I have a complex sql query with a self-join that returns 2 variables of the
same name. using the variable name in odbc_result() always returns the first
instance. Is there any way that I can retrieve the second instance?

Thanks

Mark




 

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




RE: [PHP-DB] query error

2001-01-25 Thread Mark Newnham

Looks fine, now retrieve the rows from the query.

> -Original Message-
> From: Randy Johnson [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 25, 2001 12:46 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] query error
> 
> 
> When I run any kind of query this is the value of result  
> Resource id #2
> 
> Example
> $result= mysql_query (" Select * from ACCT_TBL ") or die
> ("Error".mysql_error());
> 
> print result;
> 
> 
> any ideas?
> 
> randy
> 
> 
> -- 
> 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] Help with loop

2001-01-25 Thread Mark Newnham

$res = mysql_query("SELECT * FROM ecomm where ID ='$sid'",$db))
  if(!$res){echo("error preforming query: " . mysql_error());exit();}
//error trap
while(  $row=mysql_fetch_array($res)){
  $pno=$row["part"];


#########
Mark Newnham
Application Design Associates, Inc
6021 S.Syracuse Way #302
Englewood, CO 80111, USA

http://www.adacorp.com
#



> -Original Message-
> From: Robert [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 25, 2001 12:31 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Help with loop
> 
> 
> Why does this spit out the same part over and over until it times out?
> 
> I have 2 tables in the same database
> 
> 1:  bruindba <---Parts database
>   specific_p   <Part Number
>   manufactur  <---Manufacturer
>   package   <---Package in
>  
> 2: ecomm   <---Ecommerce database
>  ID <---session ID random number generated 
> when first part is entered
>  part   <---Part number
> 
> What I am trying to do is store the part numbers with the 
> session ID in ecomm and then pull all of them
> out with descriptions from bruindba. 
> 
> //- Get parts for this session 
> 
> // Check ecomm DB for parts by session ID 
> ---
> while ($res = mysql_query("SELECT * FROM ecomm where ID 
> ='$sid'",$db)){
>   if(!$res){echo("error preforming query: " . 
> mysql_error());exit();}   //error trap
>   $row=mysql_fetch_array($res);
>   $pno=$row["part"];
> 
>   //-Get part info from bruindba  
> ---
>   $result = mysql_query("SELECT * FROM bruindba where 
> specific_p ='$pno'",$db);
>   if(!$result){echo("error preforming query: " . 
> mysql_error());exit();}  //error trap
>   $row=mysql_fetch_array($result);
>   $spp=$row["specific_p"];
>   $mfc=$row["manufactur"];
>   $pkg=$row["package"];
>   echo" $spp";
>   echo" $pkg";
>   echo" $mfc";
> }
> 
> 
> Thanks for any help you can provide   -Bob-
>  
> 

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




[PHP-DB] Problem upgrading to 4.0.4

2001-01-23 Thread Mark Newnham

Platform: HPUX 10.20
Configuration:  PHP4.0.1pl2 --with-iodbc --without-mysql
--with-pdflib=/usr/local --without-gd 
--with-apache=../apache_1.3.14  
Using Openlink MT ODBC driver against a PROGRESS database. 

Everything in the above configuration is working fine, but I have just
attempted to upgrade to 4.0.4pl1, with the exact same configuration. The
build runs fine, however the ODBC driver is now unable to parse any query
with a 'JOIN' in it. 

Can anyone shed any light on this behaviour?


Regards

Mark


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