RE: [PHP-DB] *.xls

2001-05-08 Thread Steve Brett

i'd also be interested in this ... i have some code that will create .csv
files for download, whihc is the way i normally do it.

Steve

 -Original Message-
 From: Aivar Annamaa [mailto:[EMAIL PROTECTED]]
 Sent: 08 May 2001 13:02
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] *.xls
 
 
 Hi
 Does anyone know some lib for generating excel files.
 I ask it here because database people could use such thing.
 
 Aivar Annamaa
 
 
 
 -- 
 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] Fwd: URGENT : How can i generate scripts of database

2001-05-08 Thread Gabriel

Anyone can tell me how can i generate the scripts of my database to create it in 
another mysql server.
Or better wich other ways i´ve to do it.

Thanks in advance,

Gabriel.




Re: [PHP-DB] Fwd: URGENT : How can i generate scripts of database

2001-05-08 Thread Miles Thompson


Read your database documentation. It is usually a dump command, such as 
mysql-dump, or pgsql-dump.

These commands usually write out a script that will recreate the database 
along with the data. There may be command line switches to get just the script.

HTH- Miles



At 11:26 AM 5/8/01 -0300, Gabriel wrote:
Anyone can tell me how can i generate the scripts of my database to create 
it in another mysql server.
Or better wich other ways i´ve to do it.

Thanks in advance,

Gabriel.


--
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] Fwd: URGENT : How can i generate scripts of database

2001-05-08 Thread Michael Geier

man mysqldump

-Original Message-
From: Gabriel [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 08, 2001 9:27 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Fwd: URGENT : How can i generate scripts of database


Anyone can tell me how can i generate the scripts of my database to create
it in another mysql server.
Or better wich other ways i´ve to do it.

Thanks in advance,

Gabriel.



-- 
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 Server S1000 Weird Errors

2001-05-08 Thread John Nunez


BACKGROUND:
I was recently given a task to add a table to a MS SQL Server and a few PHP
pages to insert, edit, delete and display records from this table.
The site is currently running off an Linux Server with PHP 4.03 and a
Windows NT box running MS SQL Server 7.0.  The SQL Server is unreachable
using MS Tools because it is behind a firewall.

PROBLEM:
I created a table using the SQL command CREATE TABLE() [see source below].
I used MS SQL Manager to generate the SQL Script. I added records later on
using odbc_exec() and the SQL Command INSERT and everything was fine.
When I tried to retrieve the records using SELECT * FROM TableA [see
source below], I got the following error Warning: SQL Error:
[OpenLink][ODBC][Driver]General error, SQL state S1000 in SQLExecDirect in
/[php file path]... line 9

I have check the name of the table and it's existence using the following
SQL Query SELECT * FROM sysobject WHERE name = 'TableA' All other tables
that were created by the original developer using the MS Tools can be
queried using the same php source.

Thanks,
John Nunez

PHP source (I have removed the error check for display purposes only.)
$conn = odbc_connect(db,name,password);
$dbresult = odbc_exec($conn, SELECT * FROM TableA);
$tbContent = odbc_result_all($dbresult);
echo $tbContent;



SQL Script
CREATE TABLE [dbo].[TableA] (
[taID] [int] IDENTITY (1, 1) NOT NULL ,
[Title] [varchar] (255) NULL ,
[Message] [varchar] (5000) NULL ,
[ImgPath] [varchar] (1000) NULL ,
[ImgHeight] [int] NULL ,
[ImgWidth] [int] NULL ,
[EntryDate] [datetime] NULL ,
[Display] [varchar] (1) NULL
) ON [PRIMARY]




-- 
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] Fwd: URGENT : How can i generate scripts of database

2001-05-08 Thread [EMAIL PROTECTED]

mysqldump might be difficult though if you don't have telnet access to your
mysql.database, but if you only have php access. whats the best thing to do
in that case? has anyone tried the exporting options of myphpadmin?

 -Original Message-
 From: Michael Geier [mailto:[EMAIL PROTECTED]]
 Sent: Dienstag, 8. Mai 2001 16:36
 To: Gabriel; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Fwd: URGENT : How can i generate scripts of
 database


 man mysqldump

 -Original Message-
 From: Gabriel [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 08, 2001 9:27 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Fwd: URGENT : How can i generate scripts of database


 Anyone can tell me how can i generate the scripts of my database to create
 it in another mysql server.
 Or better wich other ways i´ve to do it.

 Thanks in advance,

 Gabriel.



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

2001-05-08 Thread indrek siitan

Hi,

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

ok, changed the code to following:

 --- 8 ---

?
$sth=odbc_prepare($DBH,SELECT Trkoodi,Trnimi FROM Turyhma WHERE
Trkoodi103000);
if (odbc_execute($sth))
{
  while(odbc_fetch_row($sth))
  {
echo li  . odbc_result($sth,Trkoodi) .  -  .
odbc_result($sth,Trnimi);
  }
}
else
{
  echo execute failed.;
}

 --- 8 ---

still no good. odbc_execute() is successful, but the while
odbc_fetch_row() falls into infinite loop until it reaches
the PHP script max execution time. then i'll get a pageful
of lines with • - (the odbc_result() call won't return
anything)


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]




RE: [PHP-DB] Problems with PHP / Progress / ODBC

2001-05-08 Thread Andrew Hill

Hi,

You may wish to try OpenLink's ODBC drivers, available at
http://www.openlinksw.com/.
We have excellent support for Progress databases.

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

 -Original Message-
 From: indrek siitan [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 08, 2001 11:08 AM
 To: Mark Newnham; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Problems with PHP / Progress / ODBC


 Hi,

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

 ok, changed the code to following:

  --- 8 ---

 ?
 $sth=odbc_prepare($DBH,SELECT Trkoodi,Trnimi FROM Turyhma WHERE
 Trkoodi103000);
 if (odbc_execute($sth))
 {
   while(odbc_fetch_row($sth))
   {
 echo li  . odbc_result($sth,Trkoodi) .  -  .
 odbc_result($sth,Trnimi);
   }
 }
 else
 {
   echo execute failed.;
 }

  --- 8 ---

 still no good. odbc_execute() is successful, but the while
 odbc_fetch_row() falls into infinite loop until it reaches
 the PHP script max execution time. then i'll get a pageful
 of lines with • - (the odbc_result() call won't return
 anything)


 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]




Re: [PHP-DB] Connection to AS/400.

2001-05-08 Thread Marc Grober

I was wrestling with this for a while.
There is a db2 distribution for linux from IBM
There was some extensive discussion on the list in February
and March of this past year, including a set of files from
Alessandro Grigiante and compiling php with   --with-ibm-db2=path
(i.e. using db2 instead of odbc, though some may argue thats out
of the frying pan and into the fire?)
I ended up putting our project on hold for a bit (as I think did Zvi)
but I would be very interested to hear any details  concerning
use of odbc or ibm-db2 to talk to db2-400

Andrew Hill wrote:

 You still need a driver for PHP to use
 with the Driver Manager, however, and there is not currently an ODBC driver
 that will talk to AS/400 directly.



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