RE: [PHP] can i use --with-unixODBC instead of --with-ibm-db2?

2002-08-09 Thread Dan Vande More

Doug, can you log in via plain db2 in linux (sorry if you said you could, I didnt read 
that far back).

Heres what I do:

*
[root@somelinuxbox /root]# su - db2inst1
[db2inst1@somelinuxbox db2inst1]$ /usr/IBMdb2/V7.1/bin/db2
(c) Copyright IBM Corporation 1993,2001
Command Line Processor for DB2 SDK 7.2.0

You can issue database manager commands and SQL statements from the command
prompt. For example:
db2 = connect to sample
db2 = bind sample.bnd

For general help, type: ?.
For command help, type: ? command, where command can be
the first few keywords of a database manager command. For example:
 ? CATALOG DATABASE for help on the CATALOG DATABASE command
 ? CATALOG  for help on all of the CATALOG commands.

To exit db2 interactive mode, type QUIT at the command prompt. Outside
interactive mode, all commands must be prefixed with 'db2'.
To list the current command option settings, type LIST COMMAND OPTIONS.

For more detailed help, refer to the Online Reference Manual.

db2 = CONNECT TO MYDB2DB user MICHAEL
Enter current password for MICHAEL:

   Database Connection Information

 Database server= OS/400 4.4.0
 SQL authorization ID   = MICHAEL
 Local database alias   = CMSFIL

db2 =
**

Names changed to protect my network!:)

Can you do that?


Thanks

Dan
-Original Message-
From: Doug Smith [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 09, 2002 7:02 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] can i use --with-unixODBC instead of --with-ibm-db2?


Matt,

I wish you were my boss :) I love MySQL and would want to use it instead
of db2 (seeing i could probably have had it working with php last week ;) )
but Somehow my boss loves to waste money on IBM products... and then
hires on people who don't know how to use them well (i.e. me!). My
philosophy is: don't waste money on it, if you can use some open source --
for example he wanted to use IBM WAS (websphere application server) but, PHP
will do everything we need to do, and is a lot easier to deal with than the
bulky WAS.

Anyways.

I had seen the IBM document that you referenced about connecting DB2 to
PHP, in fact, it's the main document i used to start attempting to get PHP
to work with DB2. The second doc you referenced from phpbuilder.net was
definately a good find -- had a couple ideas that i hadn't tried (i.e.
catalogging the db, running apache as db2inst1 [still trying to get that to
work, db2inst1 doesn't have the priviledges that root has, and henceforth
can't access all the files needed by apache])

Matt, thanks again for all your help!

-Doug

Matt [EMAIL PROTECTED] wrote in message
047001c23f46$f7707c40$[EMAIL PROTECTED]">news:047001c23f46$f7707c40$[EMAIL PROTECTED]...
 It seems way too difficult to configure db2 on linux. Let alone trying to
do
 it on freebsd, which I hope to tackle that next week.

 I tell you though, I really love mysql, it's so easy to use, and
configure.
 mysql just works. mysql's performance on a table I have that has roughly
 250,000 rows of address entries, beats our as/400 with db2 by orders of
 magnitude  and  mytest box is a  Celeron 300.

 Anyway, this is where I found the solution to the gibberish line that I
put
 in my doc (see step 3) :

http://www7b.boulder.ibm.com/dmdd/library/techarticle/scott/0614_scott.html

 You may find this of help:
 http://www.phpbuilder.com/mail/php-db/2001011/0076.php

 Oh, did you call your instance db2inst1?





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


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




RE: [PHP] can i use --with-unixODBC instead of --with-ibm-db2?

2002-08-08 Thread Dan Vande More

I used this:

Some of his info is wrong, or I had problems with, but hey, this worked:
*
Now we know DB2 works now to test it with PHP and Apache, first login as user db2inst1 
then su to the user root, dont use su - , cause this will make the shell use the 
settings of root instead of db2inst1 and we need those settings so Apache can find the 
DB2 Instances. Now first stop apache (if started ofcourse) 
/usr/local/apache/bin/apachectl stop and start apache /usr/local/apache/bin/apachectl 
start . Now create a file in de apache docroot ( on my machine thats 
/usr/local/apache/htdocs/ ) called test.php for example and fill it with the following 
example:
*

http://people.a2000.nl/nlvanrey/docs/install-db2-php-apache-linux.html


-Original Message-
From: Doug Smith [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 08, 2002 1:28 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] can i use --with-unixODBC instead of --with-ibm-db2?


 I just checked my config, and I *actually* have that line in apachectl.
Try
 that, and if it fixes it, I'll correct the doc.

although my apache is built via rpm, i put the line (.
/home/db2inst1/sqllib/db2profile) in apachectl and started httpd w/
apachectl, bt...

unfortunately i'm still getting the

Warning: SQL error: , SQL state ËtøO@Ùÿ¿6#A@ in SQLConnect in
/var/www/html/db2php/db2lib.php on line 8

error...

i also tried to add export DB2INSTANCE=db2inst1 in the same script and
that didn't help either.

could the problem be that i'm starting httpd (or apachectl) as root? i know
the . /home/db2inst1/sqllib/db2profile is supposed to make apachectl
inherit the db2 environment variables, but.. somehow it's not working :/

matt, thank you again :)

-doug


p.s. for the record__
./configure
i386-redhat-linux --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbind
ir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/includ
e --libdir=/usr/lib --sysconfdir=/etc --with-apxs=/usr/sbin/apxs --with-ibm-
db2








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


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




RE: [PHP] Disabling Browser BACK button

2002-07-31 Thread Dan Vande More

I do it this way


Page1 (fill in data)-Page2(write data, instant redirect to p1, unless dies from 
php/mysql)

Then the only way to repost, is to push the forward button.


-Original Message-
From: Petre [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 31, 2002 11:43 AM
To: Martin Clifford
Cc: php-general
Subject: Re: [PHP] Disabling Browser BACK button


Well, OK, then, How do you  design the app NOT to allow the form to POST 
again when the user hits BACK

Martin Clifford wrote:

There is never a way to disable back, forward, home, etc buttons.  They all have 
shortcuts that will ALWAYS work, so there's really no point.  Additionally, it's all 
nice and good that your site works fine without using cookies, and don't take this 
offensively, but if the client cannot use the back button without getting mishapen 
results, then it doesn't sound as if the site is designed very efficiently.

Just my opinion.

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


Petre [EMAIL PROTECTED] 07/31/02 01:16PM 

HI
Is there a way I can disable the client's browser back button, forcing 
them to use the navigation I built into the page?
Ideally, when they try to press BACK on browser, a popup asking them 
to use the navigation instead would win first prize.

The reason I'm asking is again to do with sessions, I have an app 
running 100% now without using cookies, but if the user hits BACK and 
ignores the expire warning, the app produces unwanted results ( adds 
form data again to the db etc.)
Just want to patch the holes.

Maybe write my own little browser that has no back button??






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


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




FW: [PHP] Disabling Browser BACK button

2002-07-31 Thread Dan Vande More

You are correct Chris.

However if you designed your application as the generic

Master-Detail-(write changes) structure 

you would merely have to use 

echo body onload=\javascript:history.go(-2)\; to take 
you back to the master set, assuming js is turned on, and that is the flow of your app.

I mainly design in an intranet environment, and variables are more controlled here 
than in other places.

For instance, I'm sure that noone uses anything but IE, and JS is almost for sure on.

Dan

-Original Message-
From: Chris Boget [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 31, 2002 11:54 AM
To: Dan Vande More; Petre; [EMAIL PROTECTED]
Subject: Re: [PHP] Disabling Browser BACK button


 Page1 (fill in data)-Page2(write data, instant redirect to p1,
 unless dies from php/mysql) 
 Then the only way to repost, is to push the forward button.

Unless, of course, they hit the Submit button again and I think
that was the point the original poster was getting at.  If the user
cannot hit the back button, they cannot hit submit again.

Chris



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




RE: [PHP] integrating usenet into http? how is this done???

2002-07-15 Thread Dan Vande More

I don't know, but it sure looks nice!
Dan

-Original Message-
From: Andy [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 15, 2002 6:56 AM
To: [EMAIL PROTECTED]
Subject: [PHP] integrating usenet into http? how is this done???


Hi guys,

I just found a site where they have integrated a usenet forum into their own
forum. I am wondering how this is technicaly done? The postings seem to be
pretty up to date ( I did compare them with the usenet ones)
Here is the link:
http://britishexpats.com/forums/forumdisplay.php?forumid=43s=e80f5f41207018
c5dd5751801faf1037

Has anybody an idea how they do this. I think the forum software is phpbb.
But they do not provide such a function as far as I know. All the data
inside phpbb comes out of a db usually. How is this done with copyrights
anyway?

Andy




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


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




RE: [PHP] Development Tools

2002-07-10 Thread Dan Vande More

Mark, 

I have been developing with PHP for 1 year now, and about 1 month ago got DMX, I have 
to say that I spend much much less time on building forms and little repetitive work, 
and more on building applications. I would have to say that DMX increased my 
productivity by at least 5 times.(I suck at building forms because I spend to much 
time perfecting them)
There is an initial learning curve, because DMX does some things different from what I 
had known, and some weird behaviors at times, and it certainly cannot be your entire 
application builder but I can safely say that I love it.
Do not attempt to work with it if you do not have a fundamental understanding of PHP, 
because it has some weird quirks that I were hard to pinpoint for myself.
But for building dynamic drop down lists, and recordsets, and update pages, it is 
great.
I wish they had built in some kind of form checker where you could say, check this 
field because it is a date and check this field when submitted because it is 
required
I also wish you could customize your mysql error messages, instead every one of them 
ends in or die(mysql_error())
Maybe they do have these, and I have not yet found them, so forgive me if my 
statements are incorrect.( and help me cause I'd love them!)
Again, it won't do user error checking, and when forms get complicated you have to do 
some manual editing, and the errors are generic.
But it is certainly worth that money.

Thanks
Dan

-Original Message-
From: Mark McCulligh [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 10, 2002 9:43 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Development Tools


I am looking for a good Development tool to write my PHP in and was
wondering what people are using out there.

I have been looking at Dreamweaver MX, Zend Studio 2.5 and phpEdit.
I know UltraDev 4 well with ASP, but the new MX now supports PHP.  This
MX/PHP any good?  Zend looks good with the integrated documentation and
debugging tools.

Thanks, Mark.
_
Mark McCulligh, Application Developer / Analyst
Sykes Canada Corporation www.SykesCanada.com
(888)225-6824 ex. 3262
[EMAIL PROTECTED]



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


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




RE: [PHP] Date formatting

2002-07-10 Thread Dan Vande More

To convert from user format to mysql I use:

$training_date=$_POST[training_date];
$training_date=str_replace(-, /, $training_date);//strtotime doesnt seem to work 
right if it has 12-25-2002, but does if it has 12/25/2002
$training_date=strtotime($training_date);
$training_date=date(Y-m-d,$training_date);

To convert from mysql to user I do:

$field_hire_date=$row_current_emps['field_hire_date']; 
$field_hire_date=strtotime($field_hire_date);
$field_hire_date=date(m/d/Y , $field_hire_date);



-Original Message-
From: Rw [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 10, 2002 11:25 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Date formatting


Had trouble getting this posed at the newsgroup - will try on the maillist
here:

I have a date field passed in a form like this:

01-02-2003

Is there a handy function to convert that to other ways of expressing the
date such as:

01/02/03

OR

2003-01-02

I know the syntax of the date formatting expressions ... just not for the
converting.

Thanks!



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


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




RE: [PHP] V basic newbie problem

2002-07-03 Thread Dan Vande More

DMX is a little shy on descriptions, but you want to use the Dynamic Table under the 
Application Section.
I make these 5 times a day.

-Original Message-
From: Ray Hunter [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 03, 2002 8:52 AM
To: PHP GEN; Duncan Ellwood
Subject: Re: [PHP] V basic newbie problem


try something like this


echo 'table';

while( $result = mysql_fetch_array( $q ) )
{
output here...
}

echo '/table';


S RAY HUNTER
email: [EMAIL PROTECTED]
www: http://www.venticon.com
aim: spinebl8d3



- Original Message -
From: Duncan Ellwood [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 03, 2002 8:43 AM
Subject: [PHP] V basic newbie problem


 I'm not sure if this is the right place for this but I'm just starting out
 with php and MySQL

 I have succesfully got a database up and I have managed to populate the
 first row of the html table with the first  row of  dynamic content
without
 too
 much problem. I have used the visual enviroment of DW Mx for this and it
was
 staightforward enough

 My problem arises when I want to fill in the subsequent rows of the table
 with the subesquent rows from the database. How do I create the recordset
 that will pull the info from the relevant subsequent rows for my columns?

 The code for the first row and first column entry is:

 ?php echo $row_RsSingStanDailybb['DailyBB']; ?

 but in the row below in the html table I want to refer to the second row
DB
 entry for DailyBB but I cant see how to go about this:( The Repeat server
 behaviour in DW Mx simply puts all the values in one html cell which is
not
 what I wish to achieve. Basically I want the html table to match the
 database but have only succeeded in getting the first row to display so
 far:(

 I'm sure this is simple but its my first time at all this and any help
would
 be appreciated:)

 TIA




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


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


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




RE: [PHP] Re: odbc_fetch_into ??

2002-07-02 Thread Dan Vande More

Did you remember to compile ODBC into PHP?

./configure --help shows these odbc options:

  --with-iodbc[=DIR]  Include iODBC support.  DIR is the iODBC base
  install directory, defaults to /usr/local.
  --with-unixODBC[=DIR]   Include unixODBC support.  DIR is the unixODBC base
  install directory, defaults to /usr/local.

Dan

-Original Message-
From: Analysis  Solutions [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 10:50 AM
To: PHP List
Subject: Re: [PHP] Re: odbc_fetch_into ??


On Tue, Jul 02, 2002 at 11:59:59AM -0400, Scott Fletcher wrote:
 That function, odbc_fetch_array() does not work.  PHP spit out the error,
 undefined function.

Huh?  Which version of PHP are you using?  It's available in 4.0.2 or 
greater.  Did you misspell the function name?

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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


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




RE: [PHP] Keeping Secrets in PHP Files

2002-07-01 Thread Dan Vande More

Easy,

http://www.zend.com/store/products/zend-encoder.php

Dan

-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 01, 2002 7:29 AM
To: Lazor, Ed
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Keeping Secrets in PHP Files



On Friday, June 28, 2002, at 06:14  PM, Lazor, Ed wrote:

 The hosting provider could probably implement a solution...  Alter the 
 FTP
 configuration to automatically set the group permission to that of the 
 web
 server when you transfer files.  You wouldn't need to be in the group.
 You're the owner and can modify your own files.  World Read access 
 would be
 unnecessary.

Someone pointed out last week that a maleficant can write a script that 
reads other files' data [and does something evil with that], since it 
will be executed as the web server user and the web server user can read 
all those files.

Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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


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




RE: [PHP] Page rendering speed: PostNuke or PHP-Nuke

2002-07-01 Thread Dan Vande More

http://www.php-encoder.com/

Looks like beta is starting soon for this, so we should see it in a little bit. 
They have an option for per script charge.
You upload the file and it gives you a compiled one.
My guess it is the same thing as Zend encoder, just not as expensive.

Dan

-Original Message-
From: Lazor, Ed [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 01, 2002 10:01 AM
To: 'Andres Montiel'; PHP General
Subject: RE: [PHP] Page rendering speed: PostNuke or PHP-Nuke


Check SourceForge.com to see what content management systems are available.


-Original Message-
To those who have used these content management systems: which one
renders pages faster, PostNuke or PHP-Nuke? I plan to set up a site on
my Linux box and want to know which one I should use. :)

Also, would anyone know of a PHP based content management system that
does not have the usual 3 columns look?
 

This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very
much.   

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


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




RE: [PHP] Keeping Secrets in PHP Files

2002-07-01 Thread Dan Vande More

Sorry, Wrong topic.

http://www.php-encoder.com/

Looks like beta is starting soon for this, so we should see it in a little bit. 
They have an option for per script charge.
You upload the file and it gives you a compiled one.
My guess it is the same thing as Zend encoder, just not as expensive.

Dan



Dang.  $2880 is kind of expensive!  I wish they'd base licensing more on how
many copies your encoded program you sell.

-Original Message-
http://www.zend.com/store/products/zend-encoder.php
 

This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very
much.   

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




RE: [PHP] Query String...

2002-07-01 Thread Dan Vande More

In the beginning of your page try:

$action=$_GET[action];
echo $action;

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 01, 2002 12:01 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Query String...


On Tuesday 02 July 2002 04:45, Tim Nields wrote:
 Never have encountered this.  When I include a query string on the URL line
 I can not access the variables.

 For example:  www.tim.com?action=move

 I should be able to access the variable action.  However I am currently not
 able to do this.  I am not receiving an error of any kind, but nothing is
 being produced when I echo or print this as $action.

 Is there a setting that I've missed somewhere?

register_globals

RTFM and the archives.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Truth can wait; he's used to it.
*/


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


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




RE: [PHP] Re: Finding out how a variable was registered

2002-06-05 Thread Dan Vande More

It may not work for you but this seems to work for us:

?php

if ($HTTP_SERVER_VARS[argc] != 0) // If someone is trying to pass a get argument
{
Header(Location: $PHP_SELF); // Then reload the page argument-free
exit;
}
?

-Original Message-
From: Scott Hurring [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 4:18 PM
To: Php-General (E-mail)
Subject: RE: [PHP] Re: Finding out how a variable was registered


If you want to stop most people, try posting an MD5() hash
of the field contents to the form, and then verifying it
upon form submittal.

For example:

input type=hidden name=form[last] value=Blah
input type=hidden name=form[last_md5] value= ... 

However, if you get a smart user, he can simply change
the value and the MD5 hash to be the correct hash of
the new value and circumvent all your work. 

(But then again, if you get anyone that's smart and
committed, it's just a matter of time before he will
figure out *some* loophole to subvert your forms)

---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515

 -Original Message-
 From: John Taylor-Johnston [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 05, 2002 5:24 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: Finding out how a variable was registered
 
 
 If you change your header to pragma-nocache, he should not be able
 to see the source to know what elements he needs for a method=get.
 Or you could also use a session to hide the variables?
 
 Joe Pemberton wrote:
 
  Is there a function call to figure out how a variable was 
 registered?  I am writing a page that handles a form and I 
 need to know whether or not a variable was created using the 
 GET or POST method (I don't want the user to be able to to 
 'foo.php?var=value' and mess with the results)
  - - Joe
 
  [EMAIL PROTECTED]
 
 --
 John Taylor-Johnston
 --
 ---
   ' ' '   Collège de Sherbrooke:
  ô¿ô   http://www.collegesherbrooke.qc.ca/languesmodernes/
- Université de Sherbrooke:
   http://compcanlit.ca/
   819-569-2064
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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


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




[PHP] Previous Discussions

2002-05-28 Thread Dan Vande More

Is anyone aware of previous discussions with php/mysql with using file inside the db 
(BLOBs) and integrating php to serve these files? In my opinion, I'm sure there's a 
better way than store to a temp file and send user the hyperlink, then deleting the 
temp file. Perhaps something with output buffering, etc.

I'm sure this topic has come up before, but I have been unable to find any relevant 
information.

Thank you for your help

Dan VandeMore


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




RE: [PHP] Previous Discussions

2002-05-28 Thread Dan Vande More

Hey thanks Ian! 
Could I have some examples, of say a pdf or zip?
It looks like this will work perfectly!
 
Dan

-Original Message-
From: Ian Samuel [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 28, 2002 9:00 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Previous Discussions



Is anyone aware of previous discussions with php/mysql with 
using file 
inside the db (BLOBs) and integrating php to serve these files? In my 
opinion, I'm sure there's a better way than store to a temp 
file and send 
user the hyperlink, then deleting the temp file. Perhaps 
something with 
output buffering, etc. 

Regardless of whether this is a good idea or not, it's fairly easy. Store the file 
data itself (accessible via fopen($whatever)) in a longblob, then write it back with 
the appropriate headers (Content-type: iamge/jpeg or whatever) when the time comes. 
I'd be happy to provide examples if anyone is curious.

Regards, 
Ian Samuel 




[PHP] multiple db, multiple table join

2002-05-09 Thread Dan Vande More

Good evening all,
I have a strange situation which I cannot think myself out of. To make
it simple my db looks like this
(hr db, emp_master table)
++---+
| emp_id | last_name |
++---+
|  1 | smith   |
|  3 | wesson|
|  4 | doe |
|  6 | clinton |
|  7 | bush  |
++---+
(tools db, orders table)
++-+-+
| order_id | emp_id |approved_by |
++-+-+
|  1 |   1|   6 |
|  2 |   4|   7 |
|  3 |   3|   4 |
|  4 |   7|   3 |
|  5 |   6|   1 |
++-+-+
I want my query results to be similiar to this:
if I'm selecting all, this is what I want:
1 smith clinton
2 doe   bush
3 wesson  doe
4 bush   wesson
5 clintonsmith
It seems so easy, but I've tried hard and cannot get it to work I've
been going along the lines (changed several times) of
Select tools.orders.order_id, hr.emp_master.last_name as ordered_by,
hr.emp_master.last_name as approved_by from tools.orders, hr.emp_master
where ((tools.orders.emp_id=hr.emp_master.emp_id) and
(tools.orders.approved_by=hr.emp_master.emp_id))
 
(I hope I wrote that right, it was freehand, not in db)
Thank you for any direction you can give me!
Dam
 
 



RE: [PHP] AS/400 data access

2002-04-09 Thread Dan Vande More

Thanks Mr. Collins, I wish that would have been about 7 months ago when I did 
everything:)
I used those three articles and a couple more to get it done, but the directions look 
great.


-Original Message-
From: Collins, Robert [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 09, 2002 3:24 PM
To: 'Matt Schroebel'; Collins, Robert; 'Rance Hall';
[EMAIL PROTECTED]
Subject: RE: [PHP] AS/400 data access


Thanks. Unfortunately this project is on a windows based platform, but this
may head me in the right direction.


Robert W. Collins II 
Webmaster 
New Orleans Regional Transit Authority 
Phone : (504) 248-3826 
Email : [EMAIL PROTECTED] 



-Original Message-
From: Matt Schroebel [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 09, 2002 2:46 PM
To: 'Collins, Robert'; 'Rance Hall'; [EMAIL PROTECTED]
Subject: RE: [PHP] AS/400 data access


I just did this on a Linux box running Red Hat 7.2 last Friday.  I used
several sources on the web and wrote up my exact steps and posted them at
http://www.php-faq.com/as400.html The other sources are quoted in that
document.  

Keep in mind, it's not the final version of the document, and I'd appreciate
any feedback.  After I get my app running, I'm going to move it to a FreeBSD
box and document that setup.  I was close to getting it to work on FreeBSD
last week, but decided to get it working with Redhat since that's what the
original docs describe.

I have written a couple of simple scripts that query the db on the AS/400
and display the results.  The performance seems fine. I did find that I had
to explictly state the library name the table is in as part of the sql.  For
instance:
$sql = select field1, field2 from library.table where key=$id;

If you create a collection with the same name as the user php is connecting
with then you don't need to specify the library.  I need to read up a lot
because there is a way to set the path to multiple
libraries such that I saw in one of the IBM SQL books which is
$query = SET path library1, library2;
But it wouldn't work for me. If either of you find the solution in the maze
of IBM docs, let me know and I'll add it to the instructions.

Also, you can't single quote numerics like you can in MySQL.

As I said, I just got it working, and will update the document as I learn
more about the pecularities of the AS/400.

Oh, make sure to grab the replacement odbc_fetch_array code in the user
notes at http://www.php.net/manual/en/function.odbc-fetch-array.php

 -Original Message-
 From: Collins, Robert [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, April 09, 2002 2:13 PM
 To: 'Rance Hall'; [EMAIL PROTECTED]
 Subject: RE: [PHP] AS/400 data access
 
 
 I am also trying to access data on an AS/400 have you gotten 
 it to work, if
 so can you send an example? Thanks in advance.

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


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




RE: [PHP] newbyie - date conversion to human readable form

2002-03-25 Thread Dan Vande More

Straight from my code:

$value = date(m/d/Y, strtotime($value));


If you want it otherwise, modify the paramters in the 'date' command to your
liking.
Dan

-Original Message-
From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 7:55 AM
To: [EMAIL PROTECTED]
Subject: [PHP] newbyie - date conversion to human readable form


I've dug around for a while but I can't find a direct answer on how to
convert a date in this format: 2002-03-25 to a human readable format
such as  March 25, 2002, or even better, Monday, March 25, 2002.

Can anybody help me with this, or point me to some clear directions on
how to do this?

Thanks!

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

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




[PHP] .NET

2002-03-19 Thread Dan Vande More

Before you shoot/flame me, I assure you this is not the topic you think it
is. I just want everybody to be aware that if you do a search for the
literal string .NET on google, you pull up php.net
I think one could extrapolate that this maybe one of the most popular .net
pages on google, and when the web thinks of .net, it thinks of php.
Try it:
http://www.google.com/search?hl=enq=%22.net%22


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




RE: [PHP] Website STATISTICS

2002-03-18 Thread Dan Vande More

I think awstats has everything your asking for.

-Original Message-
From: karthikeyan [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 12:31 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Website STATISTICS


Hi,

  Anybody knows any good open source website statistics tool with graph and
pie diagrams.  

  I did go to sourceforge.net and saw few but wanted to know if any of you
have found really good one.

  Basically I am looking for tool which apart from basic stuff like
referrer, ip, browser name, no of sec/min/hrs, and document name, 
should also be able to show what KEYWORD used in the search engine to access
this website.

  Looking forward for your response.

  Regards,

karthikeyan.
  

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




[PHP] What does PL mean?

2002-03-18 Thread Dan Vande More

What does the pl mean in 4.0.4-pl1
And 4.0.3 pl1?
And 4.0.1-pl2 and so on and so forth?

Thanks

Dan

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




RE: [PHP] What does PL mean?

2002-03-18 Thread Dan Vande More

Thanks miguel

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 18, 2002 5:14 PM
To: Dan Vande More
Cc: PHP-GENERAL
Subject: Re: [PHP] What does PL mean?

On Mon, 18 Mar 2002, Dan Vande More wrote:
 What does the pl mean in 4.0.4-pl1
 And 4.0.3 pl1?
 And 4.0.1-pl2 and so on and so forth?

Patch level.

Like a minor version.

miguel

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




RE: [PHP] Error Handler Problem

2002-03-09 Thread Dan Vande More

I'm not understanding completely, but could this have something to do with
it?
[quote]
error_reporting() has no effect if you have defined your own error handler
with set_error_handler()

[Editor's Note: This is not quite accurate.

E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR and
E_COMPILE_WARNING error levels will be handled as per the error_reporting
settings.

All other levels of errors will be passed to the custom error handler
defined by set_error_handler().

Zeev Suraski suggests that a simple way to use the defined levels of error
reporting with your custom error handlers is to add the following line to
the top of your error handling function:

if (!($type  error_reporting())) return;

 [EMAIL PROTECTED]]
[/quote]
Read:
http://www.php.net/manual/en/function.error-reporting.php

Dan

-Original Message-
From: S.Murali Krishna [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, March 09, 2002 6:43 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Error Handler Problem


Hi All,
I tell my requierment first. Just in short I want to capture a
error of Undefined Function .so and so... .
I set Error Handler to

E_ALL  ~E_ERROR and I set my own Error Handler to capture errors
then I called a Non-Existent Function intentionally.

in this case its not at all capturing the error and silently executing
the program. 

Can anyone tell me what is the workaround this.
For clarification here is the code.

?php

function ErrorHandler($Errcode, $Errmsg )
{
print ErrorCode:  . $Errcode  . \n ;
print ErrorMsg :  . $Errmsg   . \n ;

return false ;
}


error_reporting(E_ALL  ~E_ERROR);

$prev_hand = set_error_handler(ErrorHandler);

// It's always executing if section instead of else.

if(!$prev_hand) {
print Unable to set error handler\n ;
} else {
print Previous Handler . $prev_hand ;
}


?




[EMAIL PROTECTED]
---
We must use time wisely and forever realize that the time is 
always ripe to do right.

-- Nelson Mandela
---


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

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




RE: [PHP] PHP and IBM DB2 / odbc_connect failed

2002-03-07 Thread Dan Vande More

I had the exact same problem too, reference here and you will find the
answer, I assure you:
http://www.phpbuilder.com/forum/read.php3?num=3id=105752thread=104455

-Original Message-
From: Jerry [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 6:10 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP and IBM DB2 / odbc_connect failed


Which version of Apache did you installed to solve the problem ?


Alexander Weber [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Jerry wrote:
  I have IBM DB2 v7.2 FP5 on a Windows 2000 Server
  A Linux Web server running with Apache/PHP4 And IBM DB2 V7.2 Client
Install on it.
  When I try to use odbc_connect($dbname, $user,$password);
  I received the message:

  Warning: SQL error: , SQL state ¿Ë ?=z@éÿ¿ÛË ?=z@?=z@ in SQLConnect
in /svr/jerry/web/myphppage.php

 We had a similar problem connecting to Adabas via ODBC. We installed a
 newer Apache version and then it worked.














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

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




RE: [PHP] PHP and IBM DB2 / odbc_connect failed

2002-03-07 Thread Dan Vande More

A quick and easy check is this:
Once logged in as root do an 'su - db2inst1'
The '-' is ins mandatory to get the dbinst profile
Once there, do a 'su' with no '-' to keep the db2inst profile.
Then stop and start apache.
Dan


-Original Message-
From: Jerry [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 6:10 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP and IBM DB2 / odbc_connect failed


Which version of Apache did you installed to solve the problem ?


Alexander Weber [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Jerry wrote:
  I have IBM DB2 v7.2 FP5 on a Windows 2000 Server
  A Linux Web server running with Apache/PHP4 And IBM DB2 V7.2 Client
Install on it.
  When I try to use odbc_connect($dbname, $user,$password);
  I received the message:

  Warning: SQL error: , SQL state ¿Ë ?=z@éÿ¿ÛË ?=z@?=z@ in SQLConnect
in /svr/jerry/web/myphppage.php

 We had a similar problem connecting to Adabas via ODBC. We installed a
 newer Apache version and then it worked.














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

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




RE: [PHP] Problem with backslashes disappearing

2002-03-06 Thread Dan Vande More

try

$new_string=addslashes($old_string);

before doing anything else with it.
This will prevent from anything removing the  \ ' etc because they will all
automagically be escaped with that command.
When you pull the data back out use:

$newer_string=stripslashes($new_string);
Dan

-Original Message-
From: Torkil Johnsen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 7:34 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Problem with backslashes disappearing


Hello!

I have a simple form taking in some user text input and storing it in a
mysql database. My problem is that PHP strips off any backslashes in the
text. I realize that backspace is used as an escape character in PHP, but
sometimes i DO want it in there!!

Is there a way to do this so that I can store them? For example replacing
the backslash with some code? Like amp; can replace ?

Anyone?

- Torkil


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

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




RE: [PHP] File Upload.

2002-03-05 Thread Dan Vande More

This is exactly how I solve the problem as well, good to know I'm not the
only one with that idea. That must mean it wasn't that bad of an idea.
Dna

-Original Message-
From: Niklas Lampén [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 6:52 AM
To: Php-General
Subject: RE: [PHP] File Upload.


I've solved this kind of problems with three pages:

1. Form
2. Insert / Update data
3. Information about insert / update


Niklas

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: 5. maaliskuuta 2002 15:34
To: [EMAIL PROTECTED]
Subject: [PHP] File Upload.


Hi everybody.

I use a form to upload data to Oracle database using csv file. I need to
display a result page with all the lines who are good and the one which
are bad.

Everything works fine except the little problem of the refresh

If I click on the Explorer Refresh Button I will upload an other time
the same file.

How can I solve this problem ?

Laurent Drouet


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


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

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




RE: [PHP] Accessing Mainframe

2002-03-05 Thread Dan Vande More

http://www.e-gineer.com/instructions/installing-ibm-db2-for-php4x-with-apach
e13x-on-linux.phtml
I used this, and currently use PHP to AS400 DB2 everyday.

Dan

-Original Message-
From: Sridhar Moparthy [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 11:51 AM
To: 'Andrew Brampton'; [EMAIL PROTECTED]
Subject: RE: [PHP] Accessing Mainframe


Thank you Andrew for the reply!

Actually I have requirements for booth. I also have a requirement to access
the DB2 databases and VSAM files if possible.

Thanks Again
Sridhar



-Original Message-
From: Andrew Brampton [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 1:41 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] Accessing Mainframe


When you say accessing, how do you mean?
Access the file system? Access a service running on the Mainframe?

Please be a little more specific
Andrew
- Original Message -
From: Sridhar Moparthy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, March 05, 2002 6:15 PM
Subject: [PHP] Accessing Mainframe


 Hi All,

 Is it possible to access IBM Mainframe from PHP on Windows? Is so, do I
need
 to install any software on Mainframe? Are there any classes  available
to
 do this?

 I am using PHP 4.X on Windows.

 Thank you in advance,
 Sridhar Moparthy





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

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




RE: [PHP] Help with MySQL.

2002-03-05 Thread Dan Vande More

Once in your telnet session, from the command line type
'telnet localhost 3306' or 'telnet 127.0.0.1 3306'
Keep in mind this only proves the host is there, it doesn't disprove. The
machine may not know itself as localhost(unlikely) or the mysql server may
not be living on 3306.
If you get some weird characters(most likely the version and some other
chars) then the server is itself, is the mysql host.
Dan

-Original Message-
From: GENESiS DESiGNS [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 05, 2002 7:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Help with MySQL.

Hello everyone,

I need some help with telneting to my web host and figuring out what the
host name address is to mysql. 

My web host (which is my ISP) knows that they have MySQL but they don't know
the host name address. I want to know if there is a sentence I can type into
the telnet box to see what my MySQL host name address is? I tried 'whereis
mysql' and it came back 'mysql: /usr/bin/mysql /usr/lib/mysql
/usr/share/mysql /usr/man/man1/mysql.1.gz' so I know I have it, but whats
the host name address? Thanks dudes!


-GENESiS DESiGNS
-Sean Kennedy 
-http://www.gdesigns.vcn.com

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




RE: Re: [PHP] Help with MySQL.

2002-03-05 Thread Dan Vande More

For one of my servers I get  3.23.34-log3REu?zk*+;,
And another I get  4.0.1-alpha,ZaXs]W{,
That means that is most certainly running on it, if not you would get
something like Telnet: Unable to connect to remote host: Connection
refused
Be warned, if your isp does not know anything about their mysql server, they
may not know the password.
Dan

-Original Message-
From: GENESiS DESiGNS [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 05, 2002 8:12 PM
To: [EMAIL PROTECTED]
Subject: Re: Re: [PHP] Help with MySQL.

Dan,

What do you mean by :

If you get some weird characters(most likely the version and some other
chars) then the server is itself, is the mysql host.

Because thats what happens. Thanks,

-GENESiS DESiGNS
-Sean Kennedy 
-http://www.gdesigns.vcn.com


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

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




RE: Re: [PHP] Help with MySQL.

2002-03-05 Thread Dan Vande More

I'm sorry after re-reading the correct answer would be this:
The hostname(ip address) of the mysql box is whatever you telnet too, if
indeed you get those weird characters when you 'telnet localhost 3306'. 
For instance if you telnet to 192.168.0.1, that is the mysql server address.
If you telnet to 'server1.myisp.com' or 'server1' that is the address.
The hostname and ip address are very much interchangeable, though as a
general rule of thumb, ip address is more reliable.
Dan


-Original Message-
From: Dan Vande More [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 05, 2002 8:13 PM
To: [EMAIL PROTECTED]
Subject: RE: Re: [PHP] Help with MySQL.

For one of my servers I get  3.23.34-log3REu?zk*+;,
And another I get  4.0.1-alpha,ZaXs]W{,
That means that is most certainly running on it, if not you would get
something like Telnet: Unable to connect to remote host: Connection
refused
Be warned, if your isp does not know anything about their mysql server, they
may not know the password.
Dan

-Original Message-
From: GENESiS DESiGNS [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 05, 2002 8:12 PM
To: [EMAIL PROTECTED]
Subject: Re: Re: [PHP] Help with MySQL.

Dan,

What do you mean by :

If you get some weird characters(most likely the version and some other
chars) then the server is itself, is the mysql host.

Because thats what happens. Thanks,

-GENESiS DESiGNS
-Sean Kennedy 
-http://www.gdesigns.vcn.com


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

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

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




RE: [PHP] Re: PHP and mySQL

2002-03-05 Thread Dan Vande More

Max,
PHP.net says:

Calls to mysql_result() should not be mixed with calls to other functions
that deal with the result set. 

I would use mysql_fetch_array which they say is MUCH faster, example of how
you could use it:

?php
mysql_connect($host, $user, $password);
mysql_select_db(database);
$sqlinfo = SELECT username, COUNT(username) as count FROM usertable WHERE 
username='me' GROUP BY username;

$number_of_rows=mysql_num_rows($sqlinfo)
if($number_of_rows != '0')
{
while ($row = mysql_fetch_array($sqlinfo)) 
{
 echo count: .$row[count].br\n;
 echo username: .$row[username].br\n;
}
}
mysql_free_result($result);
?


-Original Message-
From: David Robley [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 05, 2002 8:29 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: PHP and mySQL

In article 180f01c1c403$2ac62820$[EMAIL PROTECTED], 
[EMAIL PROTECTED] says...
 I have a little problem when trying to count the number of results
returned
 in a mysql query. I was using mysql_num_rows() to do it with no problems,
 but this isn't as quick as using mySQL's COUNT(*), or so I have been told
so
 I swtiched. Here's a snipit of the code...
 
 $sqlinfo = SELECT username, COUNT(username) as count FROM usertable WHERE
 username='me' GROUP BY username;
 $sqlresult = mysql_query($sqlinfo)
   or die(mysql_error());
 
 $count = mysql_result($sqlresult,0,count);
 
 if ($count = 0) {
   FAILED
 } else {
   while ($row = mysql_fetch_array($sqlresult)) {
 $username = $row['username'];
   }
 }
 
 The count value is set correctly but:  when the while() loop is
 executed...no values are set (there are a lot more, but I shortened it for
 spaces sake). So, $username is null. If I remove the $count line, it
 worksany suggestions?
 
 Max

Assuming that your username is unique, I would expect that you would only 
get one row returned from that query? In which case much of your SQL is 
redundant.

Anyhow, your $count line reads the first row of the result, then sets the 
pointer to the next row in the result set - if this is empty (ie only one 
row retrieved) then you will get a null result for your while loop as 
there are no more results to display. Try using mysql_data_seek to return 
the pointer to row 0 before your while loop.


-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

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

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




RE: [PHP] Help me for unsubscribe

2002-03-04 Thread Dan Vande More

http://www.php.net/unsub.php
Should be in the bottom of every email you receive.
Dan

-Original Message-
From: Michele Salerno [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 7:53 AM
To: php-general
Subject: [PHP] Help me for unsubscribe


What unsubscribe at mailning list?

--
Web Master di:
http://www.coopmediante.it
Web Administrator di:
http://www.mediateca2000.net

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




RE: [PHP] Re-Compiling PHP HELP

2002-03-04 Thread Dan Vande More

Are you just compiling and installing php? Because you have to make
clean,make, stop apache, and make install apache as well.
No need to configure, your old conf will work just fine. This may not be
entirely correct, but it has always worked for me.

Dan

-Original Message-
From: James Taylor [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 11:28 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re-Compiling PHP HELP


I'm trying to compile 4.1.2, and it just isn't happening... I originally had

4.0.6 installed, I go to compile 4.1.2 and it just doesn't seem to be 
'taking' the compile.  This is what I'm doing step by step:

./configure --with-apache=../apache_1.3.22 --with-mysql=/mysql/ 
--enable-track-vars --with-config-file-path=/etc

make
make install

/www/bin/apachectl restart

I check my php_info() page, and it still says I'm running v 4.0.6
Am I missing something here? Do I need to recompile apache also?
My initial apache install had this line:

./configure --prefix=/www --activate-module=src/modules/php4/libphp4.a

So... What do I do here? 

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

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




RE: [PHP] Upload a CSV file to MySQL

2002-03-04 Thread Dan Vande More

I'm not sure if you're talking just PHP, but this is the best database tool
I've ever used:
http://anse.de/mysqlfront/
/*
Key-Features
With MySQL-Front you can...  
create/drop databases 
create/drop tables 
edit/add/delete fields 
edit/insert/delete records 
edit BLOBs and MEMOs with Bitmap/GIF/JPEG-Support 
view a list of server-variables 
view and kill other user-processes 
execute (large) SQL-scripts 
view advanced table-properties, such as Type, Comment, Key_Length and so on 
export table-structure and data into SQL-scripts or other databases 
replicate databases between two hosts (Export tables...) 
save data to CSV-Files (ideal for working with MS-Excel ®) or HTML-tables 
copy CSV-data/HTML-Tables to clipboard 
copy tables to new table-names 
manage users (new in 2.0: edit existing users) 
flush Host/Logs/Privileges/Tables 
write SQL-queries with syntax-highlighting 
import data from ODBC-datasources 
do table-diagnostics (check, optimize, repair, analyze) 
and a lot more... 
*/

Dan
-Original Message-
From: Ben C. [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 11:30 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Upload a CSV file to MySQL


Is there an easy way to upload a CSV file into a MySQL table?  Is there also
a way to export the MySQL file into a CSV file?  I would like to make a form
using PHP to do import a CSV file into an existing table.  Any advise would
be appreciated.

Ben


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

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




RE: [PHP] form variables

2002-03-04 Thread Dan Vande More

Do you mean to have the extra '=' in there?
Should it be: 
form action=quotestest.php?quote=?$quote? method=post
instead of
form action=quotestest.php?quote=?=$quote? method=post
?
-Original Message-
From: Craig Westerman [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 04, 2002 6:27 PM
To: php-general-list; Greg Donald
Subject: RE: [PHP] form variables

Thanks Donald,

I tried that before and this is URL returnedquotestest.php?quote=

Craig 
[EMAIL PROTECTED]


-Original Message-
From: Greg Donald [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 7:17 PM
To: Craig Westerman
Cc: php-general-list
Subject: Re: [PHP] form variables


On Mon, 4 Mar 2002, Craig Westerman wrote:

  form action=quotestest.php method=post

input type=text name=quote maxlength=10 size=10
input type=submit name=submitquote VALUE=Get Quote

  /form


The above form passes $quote to the page quotestest.php
How can I also pass the $quote to the URL so that the page with variable
can
be bookmarked?

Do I have to modify both pages or just the input form?

form action=quotestest.php?quote=?=$quote? method=post


--
---
Greg Donald - http://destiney.com/
http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/
---



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

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




RE: [PHP] using remote code

2002-03-03 Thread Dan Vande More


I don't think this will work, because if it is configured correctly, that
file will be parsed by PHP before(as) apache gets it, meaning the only part
apache gives you is the result of all the code executing in that page.
Exactly like a web browser, php sees ?php echo Hello, World!;? and then
gives it to apache saying Hello, World!. Visit the function in your web
browser, and what you see will be exactly what your local script sees.
However, if php is not turned on to look through files of that type, (IE
.html .inc .phps in some cases) you can actually see the code and not the
end result, which is what you want.

Dan
-Original Message-
From: Ximon Eighteen [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, March 03, 2002 5:31 PM
To: [EMAIL PROTECTED]
Subject: [PHP] using remote code

Ignoring the issues of executing untrustworthy code can someone tell me why
this won't work and how I can achieve this?

Basically there is a remote php file on another web server that has a
function in it. I want to execute this function in my own code...

I'm guessing this probably won't work but it's a nice idea. The remote
function accesses a database on the remote machine and returns an array of
information.

The more I think about what I'm trying to do the more stupid it seems

Anyway any attempt to require or include the file works fine but then I
can't use the function because it is undefined. The php.net docs seem to
imply that this is possible.

Can anyone say if it is possible and if so what I am doing wrong please, ta.




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

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