RE: [PHP-DB] LAMP

2004-08-03 Thread Galbreath, Mark A
SuSE 9.1 Pro

Mark

-Original Message-
From: Gavin Amm [mailto:[EMAIL PROTECTED]
Sent: Monday, August 02, 2004 8:40 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] LAMP


I'd really like to find a Linux distro that is a LAMP system right out
of the box.
(Linux, Apache, MySQL, PHP)
Are there any out there?

Cheers,
Gav

-- 
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] PHP use in Federal Govt

2004-07-16 Thread Galbreath, Mark A
Alls,

My division at State is trying to get PHP 5.0 approved for use by developers
in the Department, and the Powers That Be are requesting evidence that other
Federal agencies/military are using PHP, and the extent of it's use.

Anybody have a clue about this?  I sure would appreciate some help!

tia,
Mark

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



RE: [PHP-DB] PHP use in Federal Govt

2004-07-16 Thread Galbreath, Mark A
Thanks, David - I'm doing that at this moment   :-)

-Original Message-
From: David Orlovich [mailto:[EMAIL PROTECTED]
Sent: Friday, July 16, 2004 4:05 PM
To: Galbreath, Mark A
Cc: '[EMAIL PROTECTED]'
Subject: Re: [PHP-DB] PHP use in Federal Govt


Mark, a Google search with .php .gov turns up web pages in US 
government sites that use php.  It's trial and error, but I see 
government agencies appearing here and there.  HTH.  David.

On 17/07/2004, at 7:57 AM, Galbreath, Mark A wrote:

 Alls,

 My division at State is trying to get PHP 5.0 approved for use by 
 developers
 in the Department, and the Powers That Be are requesting evidence that 
 other
 Federal agencies/military are using PHP, and the extent of it's use.

 Anybody have a clue about this?  I sure would appreciate some help!

 tia,
 Mark

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


Dr David Orlovich,
Department of Botany,
University of Otago,
P.O. Box 56,
Dunedin,
New Zealand.

Phone: +643 479 9060
Fax: +643 4769 7583

-- 
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] Printing selected characters (strcnt?)

2004-07-15 Thread Galbreath, Mark A
Isn't there a tokenizer method?

Mark

-Original Message-
From: Vincent Jordan [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 15, 2004 5:31 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Printing selected characters (strcnt?)


I am trying to figure out how to select the first letter of from the form
field print it then append by datetime.

Here is an example:

snip
$first_name = $_POST['first_name'];
$last_name  = $_POST['last_name'];
$name = $first_name . ' ' . $last_name
$rma = ?strcnt($last_name), 1 . Datetime(?) // takes the 1st character from
$last_name and adds datetime in format of 715041200
/snip

Thanks any help appreciated


Vincent Jordan
Technical Support
Smart Parts, Inc.
Loyalhanna Business Complex
100 Station Street
Loyalhanna, PA 15661
800-992-2147 X 5617

-- 
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] Re: Posting Data to MySQL

2004-06-24 Thread Galbreath, Mark A
Doesn't matter how many fields are on a form; they are returned as an array
of strings in the request object.  Just iterate through the array and update
the corresponding database fields.

Mark

-Original Message-
From: Torsten Roehr [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 24, 2004 10:02 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: Posting Data to MySQL


Tom Chubb [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I am trying to design a form that posts the data to a DB, but being new to
 PHP/MySQL, it takes me ages to hand write the code and I'm sure there must
 be an easier way to do it?
 My form has 100 fields using 20 rows and 5 columns and it's taking me ages
 to write the code for it.
 Can anyone advise how they code large forms like that and if you know of
any
 software to make it easier?
 I've searched Google for hours and checked loads of Database scripts on
 sites like Hotscripts, but can't find anything.

Hi Tom,

that's a lot of information to display on one page. Can you split it up into
several forms? Of course this would not mean fewer work but maybe make it a
bit mor concise.

Regards, Torsten Roehr

-- 
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] ADOdb db abstraction library moving to sourceforge

2004-06-16 Thread Galbreath, Mark A
Thanks, John - I, for one, would be lost without ADODB.

Mark

-Original Message-
From: John Lim [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 16, 2004 2:04 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] ADOdb db abstraction library moving to sourceforge


Hello,

ADOdb is a popular database abstraction library for PHP.  It supports
a very large number of databases, including MySQL, PostgreSQL,
Firebird, Interbase, SQLite, Oracle, Frontbase, DB2, SAP DB, Sybase,
Informix, Netezza, Access, VFP, MS SQL, LDAP, ODBTP, ODBC, etc.

Due to system outages at the current site, the home page of ADOdb
has moved to sourceforge.

Kindly update your links to

http://adodb.sourceforge.net/

Given the move to sourceforge, we have decided to take advantage
of its services and we have created 2 new mailing lists:

adodb-news: low volume moderated list for important news
http://lists.sourceforge.net/lists/listinfo/adodb-news

adodb-general: for general postings
http://lists.sourceforge.net/lists/listinfo/adodb-general

Bugs should still be reported at the existing forums at
http://phplens.com/lens/lensforum/topics.php?id=4

Thank you.

John Lim

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

2004-05-10 Thread Galbreath, Mark A
Does anybody know if the security issues outlined in

http://www.securereality.com.au/archives/studyinscarlet.txt

are still salient or not?  My boss wants a technical document outlining the
security risks of using PHP in an attempt to get it approved for general use
by Security.  I just bought Mohammed Kabir's Secure PHP Development (Wiley
2003) but would like some background white papers before delving into it.
To that end, I'm using Google, but would appreciate references to any recent
documents covering the subject.

tia,
Mark

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



RE: [PHP-DB] PHP Training

2004-04-30 Thread Galbreath, Mark A
Yeah...Zandstra, Teach Yourself PHP in 24 Hours, 3rd ed. (Sams 2004).

;-)

-Original Message-
From: Rafi Sheikh [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 29, 2004 11:50 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] PHP Training


Any one know of a good training course for PHP (beg to intermediate-1-3
days) in the twin cities area?

Best regards,

RS


This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity to
which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified that
any dissemination, distribution or copying of this e-mail is prohibited. If
you have received this e-mail in error, please notify the sender by replying
to this message and delete this e-mail immediately.

-- 
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] New To PHP

2004-04-15 Thread Galbreath, Mark A
I found Lerdorf and Tatroe's Programming PHP (O'Reilly 2002) extremely
helpful in understanding the why of PHP.

Mark

-Original Message-
From: Tom Cloyes [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 15, 2004 7:54 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] New To PHP


I ma trying to learn PHP and am having difficulty with understanding it. Is 
there a good PHP creator that will create PHP which will let me specify 
what all I need to have done so that I can go back and try to figure out 
just how it all fits together?
Thanks,

Tom
KI8IZ
http://www.wooster-isp.net

-- 
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] New To PHP

2004-04-15 Thread Galbreath, Mark A
Nice resource!  Thanks for sharing!

Mark

-Original Message-
From: Mikael Grön [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 15, 2004 9:00 AM
To: Tom Cloyes; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] New To PHP


What I did to learn PHP was to surf to http://www.hotscripts.com/ and 
look at other peoples code.
Writing it yourself looking at the hotscript codes also helps you 
understand the logic of it.

Mike

On Apr 15, 2004, at 12:53, Tom Cloyes wrote:

 I ma trying to learn PHP and am having difficulty with understanding 
 it. Is there a good PHP creator that will create PHP which will let me 
 specify what all I need to have done so that I can go back and try to 
 figure out just how it all fits together?
 Thanks,

 Tom
 KI8IZ
 http://www.wooster-isp.net

-- 
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] getting one line of info at a time

2004-04-12 Thread Galbreath, Mark A
Find out what the hex is for a carriage return and use strtok() to get an
array of words, then use strlen to get the number of chars in each array
element, and use array_pop() or array_shift(), iterating over the strlen, or
test for NULL for each element in the array..

Mark

-Original Message-
From: Hull, Douglas D [mailto:[EMAIL PROTECTED]
Sent: Monday, April 12, 2004 4:45 PM
To: Note To php mysql List (E-mail)
Subject: [PHP-DB] getting one line of info at a time


1. I have a regular html textarea field for a person to enter in words with
a carriage return after each word.  In PHP how would I go about getting one
line (or word) at a time?  Then I will be needing to get character by
character.

2. I will then be searching my database to get matching values in order to
do other things.

But at the moment I am jus trying to figure #1 out.

Thanks for any help.
Doug

-- 
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] getting one line of info at a time

2004-04-12 Thread Galbreath, Mark A
Ooops, got lost in the thought

$text_area = $_POST[ textarea ];
$str = strtok( $text_area, \o );

while( !( $str === FALSE )) {
$text_array[] = $str;
}

for( $i = 0; $i  count( $text_array ); $i++ ) {

for( $j = 0; $j  stlen( $text_array[ $i ]) {
$char = substr( $array_elelment[ $i ], $j );
printf( $char );
}

-Original Message-
From: Galbreath, Mark A 
Sent: Monday, April 12, 2004 5:06 PM
To: 'Hull, Douglas D'; 'Note To php mysql List (E-mail)'
Subject: RE: [PHP-DB] getting one line of info at a time


Find out what the hex is for a carriage return and use strtok() to get an
array of words, then use strlen to get the number of chars in each array
element, and use array_pop() or array_shift(), iterating over the strlen, or
test for NULL for each element in the array..

Mark

-Original Message-
From: Hull, Douglas D [mailto:[EMAIL PROTECTED]
Sent: Monday, April 12, 2004 4:45 PM
To: Note To php mysql List (E-mail)
Subject: [PHP-DB] getting one line of info at a time


1. I have a regular html textarea field for a person to enter in words with
a carriage return after each word.  In PHP how would I go about getting one
line (or word) at a time?  Then I will be needing to get character by
character.

2. I will then be searching my database to get matching values in order to
do other things.

But at the moment I am jus trying to figure #1 out.

Thanks for any help.
Doug

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

2004-03-31 Thread Galbreath, Mark A
I don't think sorumor has it IBM is buying MySQL.

Mark

-Original Message-
From: Ignatius Reilly [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 31, 2004 6:38 AM
To: DB list PHP; Alireza Balouch
Subject: Re: [PHP-DB] Firebird


_
- Original Message - 
From: Alireza Balouch [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 31, 2004 12:25 PM
Subject: [PHP-DB] Firebird


 It looks like firebird database is on its way to replace of mysql... 

E???!!!???
How would you back this up?

-- 
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] Tree structure - how to show only current branch ??

2004-03-30 Thread Galbreath, Mark A
Already been done:

http://www.destroydrop.com/javascripts/tree/

Mark

-Original Message-
From: -{ Rene Brehmer }- [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 30, 2004 7:50 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Tree structure - how to show only current branch ??


Ok, Tom Reed got my thinker running big time ... and I've been trying to 
build an expandable and modifiable tree structure where it only displays 
the branch leading to the current folder... Showing the entire tree is 
easy, but how do I change the code to only display the branch we need??? 
... I've never coded visual trees before, so this is new for me ...

Found several samples with google where the code relies on the structure 
being fixed in the DB. What I want to create is the possibility to mode 
folders around within the tree ... literally moving branches from one place 
to another, while retaining their content.

DB structure is simply this (I want to get rid of the level field if it's 
at all possible to count the levels with recursive functions, but for now 
it stays).

  folderID int(10) UNSIGNED auto-increment
  parentID  int(10) UNSIGNED
  level  tinyint(3) UNSIGNED
  name  varchar(255)

(I'm fully aware that int may be overkill, but this is for testing
purposes...)

test data:
http://localhost/phpmyadmin/sql.php?lang=en-iso-8859-1server=1db=tree+tes
ttable=folderspos=0session_max_rows=30disp_direction=horizontalrepeat_c
ells=100dontlimitchars=0sql_query=SELECT++%2A+%0AFROM++%60folders%60++ORDE
R+BY+%60folderID%60+ASCfolderID 
http://localhost/phpmyadmin/sql.php?lang=en-iso-8859-1server=1db=tree+tes
ttable=folderspos=0session_max_rows=30disp_direction=horizontalrepeat_c
ells=100dontlimitchars=0sql_query=SELECT++%2A+%0AFROM++%60folders%60++ORDE
R+BY+%60parentID%60+ASCparentID 
http://localhost/phpmyadmin/sql.php?lang=en-iso-8859-1server=1db=tree+tes
ttable=folderspos=0session_max_rows=30disp_direction=horizontalrepeat_c
ells=100dontlimitchars=0sql_query=SELECT++%2A+%0AFROM++%60folders%60++ORDE
R+BY+%60level%60+ASClevel 
http://localhost/phpmyadmin/sql.php?lang=en-iso-8859-1server=1db=tree+tes
ttable=folderspos=0session_max_rows=30disp_direction=horizontalrepeat_c
ells=100dontlimitchars=0sql_query=SELECT++%2A+%0AFROM++%60folders%60++ORDE
R+BY+%60name%60+ASCname 

1 0 0 parent 1
2 0 0 parent 2
3 0 0 parent 3
4 0 0 parent 4
5 0 0 parent 5
6 1 1 child of 1
7 3 1 child of 3
8 1 1 child 2 of 1
9 6 2 sub-child 1
10 6 2 sub-child 2
11 10 4 sub-sub 1
12 10 4 sub-sub 2
13 11 5 sub-sub-sub 1

Current code looks like this, the 2 subfunctions prints the branches, the 
main function below prints the root structure...:

function count_children($parentID) {
// count number of children in folder
   $count = mysql_query(SELECT COUNT(*) AS num_children FROM folders WHERE 
`parentID`='$parentID');
   $numrows = mysql_fetch_array($count);

   return $numrows['num_children'];
}

function print_children($parentID) {
// print the branch of sub-folders
   $children = mysql_query(SELECT folderID,level,name FROM folders WHERE 
`parentID`='$parentID');

   while($child = mysql_fetch_array($children)) {
 $folderID = $child['folderID'];
 $name = $child['name'];
 $level = $child['level'];

 for ($i = 0; $i  $level; $i++) {
   echo('middot');
 }
 echo(middot; a
href=\test1.php?folderID=$folderID\$name/abr\n);

 // let's find children... recursive call !!
 if (count_children($folderID)  0) {
   print_children($folderID);
 }
   }
}

// get root parents -- main tree function
$parents = mysql_query(SELECT folderID,name FROM folders WHERE 
`parentID`='0');

while($folder = mysql_fetch_array($parents)) {
   $folderID = $folder['folderID'];
   $name = $folder['name'];

   echo(middot; a
href=\test1.php?folderID=$folderID\$name/abr\n);

   // let's find children...
   if (count_children($folderID)  0) {
 print_children($folderID);

   }
}


The output of all this looks like this:

· http://localhost/tests/tree%20structure/test1.php?folderID=1parent 1
·· http://localhost/tests/tree%20structure/test1.php?folderID=6child of 1
··· http://localhost/tests/tree%20structure/test1.php?folderID=9sub-child
1
··· http://localhost/tests/tree%20structure/test1.php?folderID=10sub-child
2
· http://localhost/tests/tree%20structure/test1.php?folderID=11sub-sub
1
·· 
http://localhost/tests/tree%20structure/test1.php?folderID=13sub-sub-sub 1
· http://localhost/tests/tree%20structure/test1.php?folderID=12sub-sub
2
·· http://localhost/tests/tree%20structure/test1.php?folderID=8child 2 of
1
· http://localhost/tests/tree%20structure/test1.php?folderID=2parent 2
· http://localhost/tests/tree%20structure/test1.php?folderID=3parent 3
·· http://localhost/tests/tree%20structure/test1.php?folderID=7child of 3
· http://localhost/tests/tree%20structure/test1.php?folderID=4parent 4
· http://localhost/tests/tree%20structure/test1.php?folderID=5parent 5

What I wanna do is make it possible to click on, say, 'sub-child 2', and 

RE: [PHP-DB] exporting data to excel

2004-03-25 Thread Galbreath, Mark A
Do you set the content-type in the response header like in JSP and servlets?
I've been reading the PHP Manual; where do you find stuff like this?

Mark

-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 9:02 PM
To: matthew perry
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] exporting data to excel


matthew perry wrote:

 I am looking for the easiest way to export data to an excel file.  Is 
 the easiest way to use PHP's file handling functions?

Easiest way is to just send Excel headers and output an HTML table. 
Excel will convert it to a spreadsheet.

-- 
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

-- 
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] Re: exporting data to excel

2004-03-25 Thread Galbreath, Mark A
Good stuff to know!  Thx, Geir!

Mark

-Original Message-
From: Geir Pedersen - Activio AS [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 9:05 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: exporting data to excel



Matthew,

 I am looking for the easiest way to export data to an excel file. Is
 the eaiest way to use PHP's file handling functions?

I assume you want to delivery the execl file to a web user.
Then there is no need to write the data to disk, you can
generate the whole thing on the fly while you deliver it to the
user. Here is a basic description on how:

1) Create a PHP document to generate the execl file and make
   sure the script produces HTTP headers telling the user agent
   that it is receiving an excel document. Start the script
   with:

  header (Content-type: application/vnd.ms-excel);
  header (Content-Disposition: attachment );

   The content disposition header says that the execl file is
   to be stored on disk. 

2) Generate the spreadsheet data as a list of newline separated
   rows with tab separated fields:

   echo field1\tfield2\t...\n;

3) Set up a link to the new PHP document. When a user clicks on
   that link, he will be prompted by his user agent on where to
   save the excel file.


---

Geir Pedersen
http://www.activio.com/

-- 
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] exporting data to excel

2004-03-25 Thread Galbreath, Mark A
way cool - thanks for the clues!  

Mark
It's better to TEACH a man how to fish than to GIVE him a fish!

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 25, 2004 7:46 AM

take a look at the header function
http://php.net/header
an example...ymmv

header(Content-type: application/vnd.ms-excel);
header(Content-Disposition: attachment; filename=$filename );
header(Expires: 0);
header(Cache-Control: must-revalidate, post-check=0,pre-check=0);
header(Pragma: public);

If you want to generate excel files with more features, take a look on
phpclasses.org.
There is a PHP port of the Perl Module SpreadsheetWriteExcell...

HTH
Jeff
___






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



RE: [PHP-DB] exporting data to excel

2004-03-25 Thread Galbreath, Mark A
heh heh - last week I attempted to print the Manual...didn't realize the
sucker is 2500 pages long until the printer ran out of paper...and the
buffer overflowed.

Mark

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 25, 2004 7:54 AM
To: Galbreath, Mark A
Cc: '[EMAIL PROTECTED]'
Subject: RE: [PHP-DB] exporting data to excel






Do you set the content-type in the response header like in JSP and
servlets?
I've been reading the PHP Manual; where do you find stuff like this?

take a look at the header function
http://php.net/header
an example...ymmv

header(Content-type: application/vnd.ms-excel);
header(Content-Disposition: attachment; filename=$filename );
header(Expires: 0);
header(Cache-Control: must-revalidate, post-check=0,pre-check=0);
header(Pragma: public);

If you want to generate excel files with more features, take a look on
phpclasses.org.
There is a PHP port of the Perl Module SpreadsheetWriteExcell...

HTH
Jeff
___

-- 
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] ?DHTML Layers with PHP?

2004-03-19 Thread Galbreath, Mark A
I've been sitting here all morning wracking my brains for a way to code a
hierarchical menu tree with JavaScript from database data retrieved by PHP,
so that the child menus appear on a mouse click.  Can PHP do this without
JS?  The only JS examples I can find use static menu trees, not dynamic
data.

tia,
Mark

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



RE: [PHP-DB] MySQL category tree db sorting

2004-03-19 Thread Galbreath, Mark A
Remember that this is my first script, but here's how I extracted and
associated category hierarchies:

include 'c:\apache2\adodb\adodb\adodb.inc.php';
$ADODB_CACHE_DIR = 'c:\apache2\adodb\adodb-cache';
$db = ADONewConnection( 'mysql' );
$db - Connect( 'localhost', 'root', 'mysql', 'reach');

$sql_cats = SELECT cat_id, cat_title FROM phpbb_categories ORDER BY
cat_id;
$sql_fora = SELECT forum_id, cat_id, forum_name FROM phpbb_forums ORDER BY
cat_id;
$sql_topics = SELECT forum_id, topic_id, topic_title FROM phpbb_topics
ORDER BY forum_id;

$db - SetFetchMode( ADODB_FETCH_ASSOC );
$rs_cats = $db - Execute( $sql_cats );
$rs_fora = $db - Execute( $sql_fora );
$rs_topics = $db - Execute( $sql_topics );

$cat_id = ;
$forum_id = ;
$cats_inc = 1;
$fora_inc = 1;
$topics_inc = 1;

while( $cats_row = $rs_cats - FetchNextObject() ) {
$cat_id = $cats_row - CAT_ID;
print trtd align='left' .
input type='text' value='+  . $cats_row - CAT_TITLE . ' name='
. 
$cats_row - CAT_TITLE .
' readonly onclick='change_value( this, this.name, this.value )' 
.
style='border:none;cursor:hand;color:#99;font-weight:600';

$rs_fora - MoveFirst();
while( $fora_row = $rs_fora - FetchNextObject() ) {
if( $cat_id == $fora_row - CAT_ID ) {
$forum_id = $fora_row - FORUM_ID;
print br/nbsp;nbsp;nbsp;nbsp;nbsp;input
type='text' value='+  .
$fora_row - FORUM_NAME . ' name=' . $fora_row -
FORUM_NAME . ' readonly  .
onclick='change_value( this, this.name, this.value
)'  .

style='border:none;cursor:hand;color:#99;font-weigth:600';
}

$rs_topics - MoveFirst();
while( $topics_row = $rs_topics - FetchNextObject() ) {
if(( $topics_row - TOPIC_TITLE !=  )  (
$forum_id == $topics_row - FORUM_ID )){
print
br/nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; .
input type='text' value='=  .
$topics_row - TOPIC_TITLE . ' name=' .
$topics_row - TOPIC_TITLE . ' readonly  .
onclick='change_value( this, this.name,
this.value )'  .

style='border:none;cursor:hand;color:#99;font-weigth:600';
}
}
}
print /td/trtrtdnbsp;/td/tr;
}
?

I'm sure this can be refactored, but I don't know PHP well enough to
optimize it right now.

Cheers!
Mark

-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Friday, March 19, 2004 11:42 AM
To: [EMAIL PROTECTED]; Age Bosma
Subject: Re: [PHP-DB] MySQL category tree db sorting


From: Age Bosma [EMAIL PROTECTED]

 I'm trying to work out what the most efficient way will be to get the
 complete tree structure from top to bottom of a category tree db.

Search the archives or Google for nested sets. That's going to be the most
efficient database scheme to use. Any parent-child-relationship solution is
going to require a lot of queries when your trees get large.

I second the recommendation for SQL for Smarties by Joe Celko, too.
Excellent book.

---John Holmes...

-- 
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] ?DHTML Layers with PHP?

2004-03-19 Thread Galbreath, Mark A
This is exactly what I am looking for, so can PHP generate a new
dynamic_page.php with the add. syntax?

Mark

-Original Message-
From: Paul Miller [mailto:[EMAIL PROTECTED]
Sent: Friday, March 19, 2004 12:23 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] ?DHTML Layers with PHP?


This JS script is awesome.  I work with Oracle Portal and a guy modified
it to read portal hierarchies so I know it can read dynamic data with
modification.

http://www.destroydrop.com/javascripts/tree/

I believe you just have to be able to create the parent child
relationships and display them in a js include like this:

script type=text/javascript src=dynamic_page.php
/script

With dynamic_page.php containing links like:
!--
d = new dTree('d');

d.add(44273,-1,'Corporate Documents');
d.add(44273,1,'Corporate
Documents','http://www.someserver.com/portal/page?_pageid=73,44273','Fol
der Name','');

document.write(d);
--

I am not sure of a ready made php script that can do what you want, but
I know it can be done.

HTH
- Paul

-Original Message-
From: Galbreath, Mark A [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 19, 2004 11:04 AM
To: '[EMAIL PROTECTED]'
Subject: [PHP-DB] ?DHTML Layers with PHP?


I've been sitting here all morning wracking my brains for a way to code
a hierarchical menu tree with JavaScript from database data retrieved by
PHP, so that the child menus appear on a mouse click.  Can PHP do this
without JS?  The only JS examples I can find use static menu trees, not
dynamic data.

tia,
Mark

-- 
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] ?DHTML Layers with PHP?

2004-03-19 Thread Galbreath, Mark A
This worked great (except for a couple of formatting issues) - I am able to
build the hierarchical menus from database data dynamically with PHP.
Thanks for the link!

Mark


-Original Message-
From: Paul Miller [mailto:[EMAIL PROTECTED]
Sent: Friday, March 19, 2004 12:23 PM

This JS script is awesome.  I work with Oracle Portal and a guy modified
it to read portal hierarchies so I know it can read dynamic data with
modification.

http://www.destroydrop.com/javascripts/tree/

HTH
- Paul

-Original Message-
From: Galbreath, Mark A [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 19, 2004 11:04 AM

I've been sitting here all morning wracking my brains for a way to code
a hierarchical menu tree with JavaScript from database data retrieved by
PHP, so that the child menus appear on a mouse click.  Can PHP do this
without JS?  The only JS examples I can find use static menu trees, not
dynamic data.

tia,
Mark

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



RE: [PHP-DB] An old dog, with a new trick..

2004-03-18 Thread Galbreath, Mark A
You bet!

http://www.catb.org/~esr/faqs/smart-questions.html

Mark

-Original Message-
From: Felipe Eduardo Ortiz López [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 17, 2004 11:06 PM
To: lPHP and Databases; [EMAIL PROTECTED]; lPHP For Windows; lPHP
Para Todos
Subject: [PHP-DB] An old dog, with a new trick..


Bueno, héme aquí, un perro viejo tratando de aprender nuevos trucos.
Comienzo a desarrollar en PHP, con la idea de conectar bases de datos MySQL
y Firebird a las aplicaciones. ¿Me podrían orientar de por dónde comenzar,
libros, sitios, algo así? Les estaré muy agradecido, y disculpen si comienzo
a hacer preguntas tontas...

Well, I'm here, an old dog trying to learn new tricks. I'm starting to
develop in PHP, having the idea to connect MySQL and Firebord databases to
the aplications. Can anyone lend me a hand to have a good starting, bokks,
sites, something else? I'll be very grateful, and very sorry if I'm starting
with the silly questions...

_
Felipe Eduardo Ortiz López,
Consultor.
Tiammat Software.
Yahoo! Messenger: tiammatsoftware
MSN Messenger: [EMAIL PROTECTED]
http://www.prodigyweb.net.mx/tiammat/default.html

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

2004-03-12 Thread Galbreath, Mark A
This looks really great, Bob...thx!

Mark

-Original Message-
From: Robert Twitty [mailto:[EMAIL PROTECTED]
Sent: Friday, March 12, 2004 10:19 AM
To: Galbreath, Mark A
Cc: '[EMAIL PROTECTED]'
Subject: Re: [PHP-DB] ODBC support


Hi Mark

An alternative solution for connecting to MS Access is odbtp.  Details are
available at http://odbtp.sourceforge.net.  It provides better support for
ODBC, especially in regards to MS Access.  Take a look at the
storedqry.php example at http://odbtp.sourceforge.net/examples.html.  It
shows how to execute a MS Access stored query.

The odbtp extension has a higher performance, and it allows you to
remotely connect to your Access database from any platform.

-- bob

On Thu, 11 Mar 2004, Galbreath, Mark A wrote:

 Yes, I'm a newbie to PHP, but I got a phpBB2 BBS online in a day and I'm
 psyched.

 My problem is, the PHP docs and API mention that ODBC is built into PHP
4.x
 but I can't figure out how to use it.  I would like to access the M$
Access
 JET engine directly from a PHP page.  Any clues?

 tia,
 Mark

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



[PHP-DB] ODBC support

2004-03-11 Thread Galbreath, Mark A
Yes, I'm a newbie to PHP, but I got a phpBB2 BBS online in a day and I'm
psyched.

My problem is, the PHP docs and API mention that ODBC is built into PHP 4.x
but I can't figure out how to use it.  I would like to access the M$ Access
JET engine directly from a PHP page.  Any clues?

tia,
Mark

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