RE: [PHP-DB] Reading emails with PHP

2003-12-19 Thread Dillon, John

 It may be sacrilege to mention it here, but there is an excellent perl
 module for handling mail bounces; I've used it to write a handler that
 catches the returned mail, gets the address(es) and reason(s) for the
 bounce, and then goes into our DB and flags the matching users.  I looked
 all around at the time (this summer) but saw no php code like it, so I
 overrode my client's desire for PHP with his desire for savings :-)



I'd be interested in more details on this, from the pov of a person who
primarily knows php and only dabbled in perl, as I've never got anything to
work in Perl. Do I envisage a .pl file on the server, is there a reference
to this near the mail() php sending function etc... who does it tie
together.  Can the mail be first sent with mail() or does it have to be sent
with a perl mail function?  If the answer is too perl-intensive then reply
off-group but I think it is of interest to php beginners to know what the
alternatives are and how they might be dipped in and out of.






















   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html

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



RE: [PHP-DB] Splitting a string by a ,

2003-12-05 Thread Dillon, John
I don't wish to hyjack this string but there is a module in perl for
extracting emails from files, I could not get it to work but wonder is there
any pre-written function in php that would parse text and extract the
emails.  I wish to do it with pst files, ie people who have written to me
over time in order to get them into a manageable database.

-Original Message-
From: Paul Miller [mailto:[EMAIL PROTECTED]
Sent: 05 December 2003 15:09
To: Chris Payne; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Splitting a string by a ,


if the emails are in a CSV file, you can also use fgetcsv

?php
$handle = fopen (test.csv,r);
while ($data = fgetcsv ($handle, 1000, ,)) {
$num = count ($data);
for ($c=0; $c  $num; $c++) {
print $data[$c] . br\n;
}
}
fclose ($handle);
?

- Paul

-Original Message-
From: Chris Payne [mailto:[EMAIL PROTECTED]
Sent: Friday, December 05, 2003 1:23 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Splitting a string by a ,


Hi there everyone,

I'm trying to split a string into an Array by a , but I kepe getting errors.
Looking at the PHP manual, I thought it would be this way:

$keywords = preg_split(,, $email);

But it keeps saying that the , isn't an ending delimiter?

Any help would be appreciated, i'm trying to split email addresses from an
input box seperated by a ,

Thanks for any help.

Chris

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


   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html

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



[PHP-DB] Dumping database/restoring

2003-12-04 Thread Dillon, John
I use Mascon from scibit to view my database.  It has a dump facility to
dump to another database or to a local file.  I am afraid of the first
option lest it overwrites tables already on the other server.  When I dump
to a local file it is a text file and I can't work out how I would restore
from this file.  The support desk isn't answering and the notes don't cover
restoring.  That's the background.  The question is how do people out there
back up their database residing on a server to a local file? Ideally I would
download the database and save on a CD, and be able to restore from this if
the worst happened.







   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html

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



RE: Re[2]: [PHP-DB] Dumping database/restoring

2003-12-04 Thread Dillon, John

Hi Richard,


 I simply login to my server and issue a command like:

I think that's the bit I missed.  I've managed to create the database-d web
site (and live happily) without ever logging in to a shell-type area.  I've
begun to use Putty/SSH as Leech doesn't show me a shell to type commands to.

Thanks,

John
























   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html

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



RE: Re[2]: [PHP-DB] Dumping database/restoring

2003-12-04 Thread Dillon, John
Hi Richard,

 I simply login to my server and issue a command like:

 mysqldump -hmysqlserverhost.com -utheusername -p dbname 
dbname.sql

 It will then prompt me for my password and dump the database (dbname)
into dbname.sql

 -h = the sql host (often localhost)
 -u = a mysql account that has permissions to do this
 -p = prompt you to enter the password

 This file I then copy to another machine and do the reverse with
mysqlimport (same syntax,  instead of  at the end).



I am proposing to back up the database using the following command, using
putty/ssh:

mysqldump -opt --allow-keywords -hSERVERADDRESS -uUSER -p DATABASE-NAME 
c:\localpath.sql

[from a post by Jon Benson on http://www.mysql.com/doc/en/mysqldump.html]

It worries me that --opt includes a add-drop-table command.  Since it is
creating a new file, how does this affect anything.  I just don't want to
delete anything.  Is it relevant on restoring only?

Do you think the above command is OK to try?  I'm allowing keywords as I
made the mistake of calling one of my fields 'key' and haven't changed it
yet.

Thanks,

John


   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html

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



[PHP-DB] Parse error on array and SQL query

2003-11-20 Thread Dillon, John

On line 188 and similar:
line 187$this=$altIDs[$i]; 
line 188$query .= ID='$this'; 

I get the error: Parse error: parse error in
/home/jdillon/public_html/provreport.php on line 188

Could this be because some setting has been changed on my shared host?

John

































   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html

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



RE: [PHP-DB] Parse error on array and SQL query

2003-11-20 Thread Dillon, John
My host provider suggested escaping the SQL: $query .= ID=\'$this\'; which
gets rid of the php error but gives invalid SQL.  After a few exchanges with
them it suddenly worked again as: $query .= ID='$this';.

-Original Message-
From: Hutchins, Richard [mailto:[EMAIL PROTECTED]
Sent: 20 November 2003 14:43
To: 'Dillon, John'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Parse error on array and SQL query


Speaking for myself only, I'm probably going to need to see more code than
this to be able to help. These two lines appear to be OK. The error might be
in what feeds line 187.

 -Original Message-
 From: Dillon, John [mailto:[EMAIL PROTECTED]
 Sent: Thursday, November 20, 2003 9:16 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Parse error on array and SQL query
 
 
 
 On line 188 and similar:
   line 187$this=$altIDs[$i]; 
   line 188$query .= ID='$this'; 
 
 I get the error: Parse error: parse error in
 /home/jdillon/public_html/provreport.php on line 188
 
 Could this be because some setting has been changed on my shared host?
 
 John
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
    http://www.cantor.com
 CONFIDENTIAL: This e-mail, including its contents and 
 attachments, if any, are confidential. If you are not the 
 named recipient please notify the sender and immediately 
 delete it. You may not disseminate, distribute, or forward 
 this e-mail message or disclose its contents to anybody else. 
 Copyright and any other intellectual property rights in its 
 contents are the sole property of Cantor Fitzgerald.
  E-mail transmission cannot be guaranteed to be secure or 
 error-free. The sender therefore does not accept liability 
 for any errors or omissions in the contents of this message 
 which arise as a result of e-mail transmission.  If 
 verification is required please request a hard-copy version.
  Although we routinely screen for viruses, addressees 
 should check this e-mail and any attachments for viruses. We 
 make no representation or warranty as to the absence of 
 viruses in this e-mail or any attachments. Please note that 
 to ensure regulatory compliance and for the protection of our 
 customers and business, we may monitor and read e-mails sent 
 to and from our server(s). 
 
 For further important information, please read the  Important 
 Legal Information and Legal Statement at 
 http://www.cantor.com/legal_information.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

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



RE: [PHP-DB] Parse error on array and SQL query

2003-11-20 Thread Dillon, John

Dillon, John wrote:

 On line 188 and similar:
   line 187$this=$altIDs[$i]; 
   line 188$query .= ID='$this'; 
 
 I get the error: Parse error: parse error in
 /home/jdillon/public_html/provreport.php on line 188
 
 Could this be because some setting has been changed on my shared host?

$this is normally used in object oriented programming to signify the 
current object. That may be causing the trouble. I'd use another 
variable than $this.

-- 
---John Holmes...


Tried that, doesn't work with:

$query=INSERT INTO ReplyTbl VALUES (' . $monster1 . ', ' . $monster2 .
', ' . $monster3 . ', NULL, NULL);

Don't suppose they use 'monster' as a reserved word...

but the similar code works in another file.

John


http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html

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



[PHP-DB] RE: Adding in MySQL

2003-11-12 Thread Dillon, John
Thanks for the three replies and two tickings-off.  It was a spelling
mistake in my table name.

The reason I tend to top post is that you then don't have to read the
disclaimer or address details from my company in a reply.  Sometimes in easy
situations the question is clear from the reply plus the subject line.

Regards,

John


   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html

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



[PHP-DB] Adding in MySQL

2003-11-11 Thread Dillon, John
Can I UPDATE an int record with MySql and add 1 to it? without extracting it
into a variable first?  If so, what am I looking for in the www.mysql.com
manual.  Seems it only deals with SELECT and WHERE.

Thanks,

John
































   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html

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



[PHP-DB] number_format problem

2003-11-05 Thread Dillon, John
I want to show a number from a database in the format x,xxx.00 in a
textfield, then if it is changed by the user I want to post the value of the
number to a decimal field.  However, once you number_format the number it
becomes a string, and numbers like 3,379.90 give a value of 3 when posted to
the database, which is hinted at in the notes on number_format.  I suppose I
need a string to number function - can someone tell me what this might be
called please?

Regards,

John








































   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html

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



[PHP-DB] Configuring GD for Windows: image functions

2003-10-24 Thread Dillon, John
Could someone suggest where I am going wrong in configuring GD for Windows
please?

 Ruunning Apache 1.3.2 and PHP 4.3.28
 
 Apache httpd.conf says:
 
LoadModule php4_module c:/PHP/php-4.3.2-Win32/sapi/php4apache.dll
 
 php.ini is only in c:\WINNT and says
 
extension=php_gd2.dll
 
 When I start Apache it says:
 
...unable to load ./extensions\php_gd2.dll ...could not be found
 
 This file (773KB 27/08/02) is in:
 
 c:\PHP
 c:\PHP\extensions
 c:\PHP\php-4.3.2-Win32\extensions
 c:\Program Files\PHP
 c:\Program Files\PHP\extensions
 c:\WINNT
 c:\WINNT\extensions
 
 for good measure.
 
 php.ini in c:\winnt says:
; Directory in which the loadable extensions (modules) reside.
extension_dir = ./extensions
 
 Manual says:
 
 For Windows users who wants to enable the GD libary:
 
 It took me some while to figure this out, but in the end it worked (and
still does) great.
 
 1. First download the latest (stable recommended) version of php
 2. Unzip to f.ex c:\php\
 
 3. Now you should have a file in c:\php\ that's named php.ini.dist (or
something like that). Rename that to php.ini and copy t to the root of your
Windows directory.
 
 4. Open the php.ini file (the easiers way is to open the run promnt at your
start menu and just type php.ini and hit enter).
 
 5. Search (ctrl+f) for extension_dir. The default value is set to ./,
make it to ./extensions
 
 6. Now you need to find where in the php.ini the modules for Windows is
located. Search for gd.
 
 7. Remove the ; char infront of this line: extension=php_gd2.dll
 
 8. Try make a php script with some image functions and see if it works.
F.ex $im = imageCreate(test.jpg);
 If you get a message that says something like imageCreate function doesn't
exist the gd libary is not loaded.
 
 9. That's all. Have fun using GD in Windows :) 
 


   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html

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



[PHP-DB] RE: Configuring GD for Windows: image functions

2003-10-24 Thread Dillon, John
I actually got this to work by changing ./extensions to c:\php\extensions.
Still don't know where the ./ is relative to.  There is no error on starting
Apache.

However, at the code lines:
line 161 $file=$img[$y];
line 162 $src_img=ImageCreateFromJPEG($file);

I get error:
imagecreatefromjpeg: Unable to open 'images/R0012448.JPG' for reading in
c:\program files\apache group\apache\htdocs\pics\apics3.php on line 162

and it fails on:
$src_img=ImageRotate($src_img,90,0);

with 'unknown function'.

The manual says:

the function imagerotate() is available when php is built with bundled gd.
So this function won't be available when you (or your webhosting) build the
php gd support with external gd packages, either from the distribution CD or
from www.boutell.com.

built php using '--with-gd', not '--with-gd=DIR' to have this function
working.

This behaviour exist up to php-4.3.3.


I have php 4.3.28.  So is it a solution to change to 4.3.3 as there is
something about Upgraded the bundled GD library to version GD 2.0.15 in
the announcements: http://www.php.net/release_4_3_3.php.

Thanks,
John


-Original Message-
From: Dillon, John 
Sent: 24 October 2003 15:22
To: '[EMAIL PROTECTED]'
Subject: Configuring GD for Windows: image functions


Could someone suggest where I am going wrong in configuring GD for Windows
please?

 Ruunning Apache 1.3.2 and PHP 4.3.28
 
 Apache httpd.conf says:
 
LoadModule php4_module c:/PHP/php-4.3.2-Win32/sapi/php4apache.dll
 
 php.ini is only in c:\WINNT and says
 
extension=php_gd2.dll
 
 When I start Apache it says:
 
...unable to load ./extensions\php_gd2.dll ...could not be found
 
 This file (773KB 27/08/02) is in:
 
 c:\PHP
 c:\PHP\extensions
 c:\PHP\php-4.3.2-Win32\extensions
 c:\Program Files\PHP
 c:\Program Files\PHP\extensions
 c:\WINNT
 c:\WINNT\extensions
 
 for good measure.
 
 php.ini in c:\winnt says:
; Directory in which the loadable extensions (modules) reside.
extension_dir = ./extensions
 
 Manual says:
 
 For Windows users who wants to enable the GD libary:
 
 It took me some while to figure this out, but in the end it worked (and
still does) great.
 
 1. First download the latest (stable recommended) version of php
 2. Unzip to f.ex c:\php\
 
 3. Now you should have a file in c:\php\ that's named php.ini.dist (or
something like that). Rename that to php.ini and copy t to the root of your
Windows directory.
 
 4. Open the php.ini file (the easiers way is to open the run promnt at your
start menu and just type php.ini and hit enter).
 
 5. Search (ctrl+f) for extension_dir. The default value is set to ./,
make it to ./extensions
 
 6. Now you need to find where in the php.ini the modules for Windows is
located. Search for gd.
 
 7. Remove the ; char infront of this line: extension=php_gd2.dll
 
 8. Try make a php script with some image functions and see if it works.
F.ex $im = imageCreate(test.jpg);
 If you get a message that says something like imageCreate function doesn't
exist the gd libary is not loaded.
 
 9. That's all. Have fun using GD in Windows :) 
 


   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html

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



[PHP-DB] RE: Error settings

2003-10-22 Thread Dillon, John
Thanks to those who helped on this.  It helped to re-start the server.  But
the other problem I found out was that register_globals was turned off by
default, so variables passed, as for instance ?ID=3 in the URL, were not
recognised.  I turned register_globals on in the Apache config file:
php_flag register_globals on.

-Original Message-
From: Dillon, John 
Sent: 21 October 2003 16:05
To: [EMAIL PROTECTED]
Subject: Error settings


How do I get rid of the undefined variable errors I get on a new (default)
set up of Apache 1.3.28/PHP4.3.2 (without re-writing the code).  It works on
the internet on my host providers server but I am running this on localhost.
I also get undefined offset error.

Regards,

John

























































   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html

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



[PHP-DB] Error settings

2003-10-21 Thread Dillon, John
How do I get rid of the undefined variable errors I get on a new (default)
set up of Apache 1.3.28/PHP4.3.2 (without re-writing the code).  It works on
the internet on my host providers server but I am running this on localhost.
I also get undefined offset error.

Regards,

John
































   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html

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



RE: [PHP-DB] Error settings

2003-10-21 Thread Dillon, John
From: Dillon, John [EMAIL PROTECTED]

 How do I get rid of the undefined variable errors I get on a new (default)
 set up of Apache 1.3.28/PHP4.3.2 (without re-writing the code).  It works
on
 the internet on my host providers server but I am running this on
localhost.
 I also get undefined offset error.

Adjust your error_reporting level in php.ini or use the error_reporting()
function.

---John Holmes...


Hm. Adjusted error_reporting to none.  Why would I still get: 

Forbidden
You don't have permission to access /method=post on this server.


Apache/1.3.28 Server at www.somenet.com Port 80

same if I use get.

And if I use the address: http://localhost/apics3.php?ID=349 it complains
about undefined variable, ID.

bNotice/b:  Undefined variable:  ID in bc:\program files\apache
group\apache\htdocs\apics3.php/b on line b11/bbr /

My php.ini contains: 
quote
; This directive tells PHP whether to declare the argvargc variables (that
; would contain the GET information).  If you don't use these variables, you
; should turn it off for increased performance.
register_argc_argv = On
unquote

My Apache httpd file has:
quote
   LoadModule php4_module c:/PHP/php-4.3.2-Win32/sapi/php4apache.dll
   AddModule mod_php4.c
   AddType application/x-httpd-php .php
unquote

Sounds like I've adjusted the wrong file.  I have only one php.ini file in
c:\winnt (apart from the one in c:\php\backup), the one in
c:/PHP/php-4.3.2-Win32 is called php.ini-dist and php.ini-recommended.  I
haven't touched these.  Should I?

Thanks,

John























http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any,
are confidential. If you are not the named recipient please notify the
sender and immediately delete it. You may not disseminate, distribute, or
forward this e-mail message or disclose its contents to anybody else.
Copyright and any other intellectual property rights in its contents are the
sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free.
The sender therefore does not accept liability for any errors or omissions
in the contents of this message which arise as a result of e-mail
transmission.  If verification is required please request a hard-copy
version.
 Although we routinely screen for viruses, addressees should check this
e-mail and any attachments for viruses. We make no representation or
warranty as to the absence of viruses in this e-mail or any attachments.
Please note that to ensure regulatory compliance and for the protection of
our customers and business, we may monitor and read e-mails sent to and from
our server(s).

For further important information, please read the  Important Legal
Information and Legal Statement at
http://www.cantor.com/legal_information.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] Round a number

2003-10-03 Thread Dillon, John
This should do it:

http://www.mysql.com/doc/en/Miscellaneous_functions.html
FORMAT(X,D) 
Formats the number X to a format like '#,###,###.##', rounded to D decimals,
and returns the result as a string. If D is 0, the result will have no
decimal point or fractional part: 
mysql SELECT FORMAT(12332.123456, 4);
- '12,332.1235'
mysql SELECT FORMAT(12332.1,4);
- '12,332.1000'
mysql SELECT FORMAT(12332.2,0);
- '12,332'

John


 I have a query that returns a number from  culculation in my table. It
 returns say 4.00, 8.75, 0.00, 12.50 etc. How can I get MySQL to return the
 number without any zeros, i.e. 4, 8.75, 0, 12.5 etc?
















   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html

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



[PHP-DB] ereg_replace

2003-09-30 Thread Dillon, John
strip_tags() is used to remove HTML tags, eg for showing text on the browser
and then sending it by plain text email or storing in the db.  As a matter
of interest, how is this done using ereg_replace.  I thought this would work
^.*$, that is being with  and any number of single characters ending with
.  Didn't seem to work - why?

John

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



[PHP-DB] MySQL: CREATE TABLE, BLOB, UNIQUE, INDEX etc

2003-08-29 Thread Dillon, John
My code:

$query=
CREATE TABLE IF NOT EXISTS temp3 UNIQUE(CON175) 
IGNORE SELECT DISTINCT CONCAT($tbl2.this,$tbl2.that) AS CON175 FROM
$tbl2 
WHERE $tbl2.this='$rcc'
; 

gives error:

Query failed: BLOB column 'CON175' used in key specification without a key
length.

Manual suggests to give a BLOB a length:
CREATE TABLE test (blob_col BLOB, INDEX(blob_col(10)));

...but how do you work this into the above query?
CREATE TABLE IF NOT EXISTS temp3 (UNIQUE(CON175) BLOB,
INDEX(CON175)(50))...

..does not work, I suppose because CON175 has not been created yet?

CON175 is BLOB by default resulting from this part of the query: IGNORE
SELECT DISTINCT CONCAT($tbl2.this,$tbl2.that)... this and that are varchar
types.  How do I set this as varchar instead:

UNIQUE(CON175) VARCHAR(50)

does not work.

http://www.mysql.com/doc/en/CREATE_TABLE.html - lacks examples!

John























   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html

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



[PHP-DB] MySQL query failing on apostrophe in data

2003-08-27 Thread Dillon, John
How do I avoid the problem in the subject hereto?  SELECT query uses
variable in the WHERE clause.  Fails on the following query:

SELECT Tbl.fld FROM Tbl WHERE Tbl.fld2='11301201 0603A HKA 3902 #3708_JD's
AE Exp' AND ...

John











































   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html

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



[PHP-DB] RE: MySQL query failing on apostrophe in data

2003-08-27 Thread Dillon, John
Seemingly:

http://www.php.net/manual/en/function.mysql-escape-string.php

-Original Message-
From: Dillon, John 
Sent: 27 August 2003 17:59
To: 'PHP-DB'
Subject: MySQL query failing on apostrophe in data 


How do I avoid the problem in the subject hereto?  SELECT query uses
variable in the WHERE clause.  Fails on the following query:

SELECT Tbl.fld FROM Tbl WHERE Tbl.fld2='11301201 0603A HKA 3902 #3708_JD's
AE Exp' AND ...

John











































   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html

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



[PHP-DB] DISTINCT not working

2003-08-21 Thread Dillon, John

Any ideas on why the DISTINCT would not work in the following testing code:

$query=CREATE TABLE IF NOT EXISTS temp3TEMP 
SELECT DISTINCTROW ROUND($tbl2.Net*.175,2) AS ExpNet175, 
CONCAT($tbl2.Journal,$tbl2.Description) AS CON175 
FROM $tbl2 
WHERE $tbl2.Dept='$rcc' 
AND $tbl2.Net0;

$query=CREATE TABLE IF NOT EXISTS temp3 
SELECT DISTINCTROW temp3TEMP.ExpNet175, 
LEFT(temp3TEMP.CON175,2048) AS CON175 
FROM temp3TEMP 
ORDER BY temp3TEMP.CON175; 

John










































   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html


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



[PHP-DB] RE: DISTINCT not working

2003-08-21 Thread Dillon, John
Please ignore this question - sorry, it does actually work.  

However, I still have no suggestions on whether I should try to uninstall
Apache 2.0.47 and install the 1.x version to be compatible with PHP.

***previous query***
... while setting PHP/MySQL/Apache up on my computer to try solve this I've
just noticed that PHP is not recommended with the latest verion of Apache.
Should I/can I just uninstall Apache in order to roll it back from the
2.0.47 version to the previous stable 1.x version? I don't see any uninstall
file in the Apache directory...
***

or can I just install the earlier version on my computer as well?

John

-Original Message-
From: Dillon, John 
Sent: 21 August 2003 16:12
To: [EMAIL PROTECTED]
Subject: DISTINCT not working



Any ideas on why the DISTINCT would not work in the following testing code:

$query=CREATE TABLE IF NOT EXISTS temp3TEMP 
SELECT DISTINCTROW ROUND($tbl2.Net*.175,2) AS ExpNet175, 
CONCAT($tbl2.Journal,$tbl2.Description) AS CON175 
FROM $tbl2 
WHERE $tbl2.Dept='$rcc' 
AND $tbl2.Net0;

$query=CREATE TABLE IF NOT EXISTS temp3 
SELECT DISTINCTROW temp3TEMP.ExpNet175, 
LEFT(temp3TEMP.CON175,2048) AS CON175 
FROM temp3TEMP 
ORDER BY temp3TEMP.CON175; 

John










































   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html


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



RE: [PHP-DB] Queries probably timing out

2003-08-20 Thread Dillon, John
I've solved the immediate problem by doing another temp query to make the
big table smaller - first doing the WHERE clause and the CONCAT to cut down
the work on the second temp query.

Thanks for all the suggestions.

However, while setting PHP/MySQL/Apache up on my computer to try solve this
I've just noticed that PHP is not recommended with the latest verion of
Apache.  Should I/can I just uninstall Apache in order to roll it back from
the 2.0 version to the previous stable 1.x version? I don't see any
uninstall file in the Apache directory...

John

-Original Message-
From: Micah Stevens [mailto:[EMAIL PROTECTED]
Sent: 19 August 2003 20:32
To: PHP-DB List
Subject: Re: [PHP-DB] Queries probably timing out


IF it's a linux server apparently there's a glibc problem from a while back 
that causes this. Check to see if it's a redhat server. If that's the case, 
all you can do is get your host to upgrade. Or host your own server.

It's starting to sound like a OS issue after searching around on google. I'l

call up tech support and whine until they did something, but that's just me.

:) That query isn't that bad. 

-Micah


On Tuesday 19 August 2003 10:54 am, Dillon, John wrote:
 I set set_time_limit (10*60); high up.

 Error message:
 Lost connection to MySQL server during query

 Query is:
 $query=CREATE TABLE IF NOT EXISTS $tbl1
 SELECT TestData1.Year,

TestData1.Period,TestData1.Co,TestData1.Acct,TestData1.Dept,TestData1.Descr
i ption,TestData1.Net,TestData1.Net*.175 AS Exps175, TestData2.USD FROM
 TestData1 INNER JOIN TestData2 ON

CONCAT(TestData1.Journal,TestData1.Description)=CONCAT(TestData2.journal,Te
s tData2.description) WHERE TestData1.Dept'D1';

 Thanks,
 John

 -Original Message-
 From: Micah Stevens [mailto:[EMAIL PROTECTED]
 Sent: 19 August 2003 18:00
 To: PHP-DB List
 Subject: Re: [PHP-DB] Queries probably timing out



 What leads you to believe that it's a query timeout? Is the php script
 timing
 out waiting for the database? Do you get an error saying something about
 Max
 Execution Time?

 If so, you may want to set that higher in your script. Go check out:
 http://si.php.net/manual/en/function.set-time-limit.php

 That's not a small database, but it unless you're query has some CRAZY
join
 action in it, it should pre fairly speedy.  I've never seen MySQL time out
 though.  Even with some stupidly slow queries I've done in the past. So
I'm
 guessing it's PHP.

 If you get an error, post it on the list.
 -Micah

 On Tuesday 19 August 2003 2:59 am, Ignatius Reilly wrote:
  
  - Original Message -
  From: Dillon, John [EMAIL PROTECTED]
  To: PHP-DB List [EMAIL PROTECTED]
  Sent: Tuesday, August 19, 2003 11:47 AM
  Subject: [PHP-DB] Queries probably timing out
 
 
  I'm doing queries on tables with 45,000 rows in one table and 1-2000
rows
  in another..  I think the queries are failing due to timeout on the

 server.

  The server is not dedicated to me and I may not be able to affect the
  timeout settings...though I'll ask my hosting company (Positive
  Internet). If I decide to do the queries on my local PC (I don't need or
  want to do them over the internet),
 
  (1) do I have to set up my PC as a server,
 
  Yes.
 
  (2) if so what's the quickest and easiest server to get started with,
 
  Install Apache, PHP and MySQL. There are countless tutes on the web on
  how to do so. It is a breeze under Windows 2000
 
  (3) are there complications running the server on the same PC as the

 client

  applications (ie my PHP code),
 
  No, except maybe performance
 
  (4) do I then download MySQL and PHP onto it, though I read PHP comes
  bundled with MySQL,
 
  PHP has an API to MySQL, but you have to have first a MySQL server
  running
 
  (5) will it become clear to me what host name/IP address to use to
  connect to the database (up to now I've been told by the hosting
  company).
 
  You can use a dynamic DNS set-up (look for instance www.dnsmadeeasy.com)

 if

  you need a name-based address. Also a breeze to set up.
 
  Any other suggestions on timeouts on queries?
 
  Thanks,
 
  John
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  http://www.cantor.com
  CONFIDENTIAL: This e-mail, including its contents and attachments, if
  any, are confidential. If you are not the named recipient please notify
  the sender and immediately delete it. You may not disseminate,
  distribute, or forward this e-mail message or disclose its contents to
  anybody else. Copyright and any other intellectual property rights in
its
  contents are the sole property of Cantor Fitzgerald.
   E-mail transmission cannot be guaranteed to be secure or
error-free.
  The sender therefore does not accept liability for any errors or
  omissions in the contents of this message which arise as a result of
  e-mail transmission.  If verification is required please request a
  hard-copy version.
   Although we routinely screen for viruses, addressees

[PHP-DB] Queries probably timing out

2003-08-19 Thread Dillon, John
I'm doing queries on tables with 45,000 rows in one table and 1-2000 rows in
another..  I think the queries are failing due to timeout on the server.
The server is not dedicated to me and I may not be able to affect the
timeout settings...though I'll ask my hosting company (Positive Internet).
If I decide to do the queries on my local PC (I don't need or want to do
them over the internet), 

(1) do I have to set up my PC as a server, 
(2) if so what's the quickest and easiest server to get started with, 
(3) are there complications running the server on the same PC as the client
applications (ie my PHP code), 
(4) do I then download MySQL and PHP onto it, though I read PHP comes
bundled with MySQL, 
(5) will it become clear to me what host name/IP address to use to connect
to the database (up to now I've been told by the hosting company).

Any other suggestions on timeouts on queries?

Thanks,

John






























   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html


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



RE: [PHP-DB] Queries probably timing out

2003-08-19 Thread Dillon, John
I set set_time_limit (10*60); high up.

Error message:
Lost connection to MySQL server during query

Query is:
$query=CREATE TABLE IF NOT EXISTS $tbl1
SELECT TestData1.Year,
TestData1.Period,TestData1.Co,TestData1.Acct,TestData1.Dept,TestData1.Descri
ption,TestData1.Net,TestData1.Net*.175 AS Exps175, TestData2.USD FROM
TestData1 INNER JOIN TestData2 ON
CONCAT(TestData1.Journal,TestData1.Description)=CONCAT(TestData2.journal,Tes
tData2.description) WHERE TestData1.Dept'D1';

Thanks,
John

-Original Message-
From: Micah Stevens [mailto:[EMAIL PROTECTED]
Sent: 19 August 2003 18:00
To: PHP-DB List
Subject: Re: [PHP-DB] Queries probably timing out



What leads you to believe that it's a query timeout? Is the php script
timing 
out waiting for the database? Do you get an error saying something about
Max 
Execution Time?

If so, you may want to set that higher in your script. Go check out: 
http://si.php.net/manual/en/function.set-time-limit.php

That's not a small database, but it unless you're query has some CRAZY join 
action in it, it should pre fairly speedy.  I've never seen MySQL time out 
though.  Even with some stupidly slow queries I've done in the past. So I'm 
guessing it's PHP.

If you get an error, post it on the list.
-Micah


On Tuesday 19 August 2003 2:59 am, Ignatius Reilly wrote:
 
 - Original Message -
 From: Dillon, John [EMAIL PROTECTED]
 To: PHP-DB List [EMAIL PROTECTED]
 Sent: Tuesday, August 19, 2003 11:47 AM
 Subject: [PHP-DB] Queries probably timing out


 I'm doing queries on tables with 45,000 rows in one table and 1-2000 rows
 in another..  I think the queries are failing due to timeout on the
server.
 The server is not dedicated to me and I may not be able to affect the
 timeout settings...though I'll ask my hosting company (Positive Internet).
 If I decide to do the queries on my local PC (I don't need or want to do
 them over the internet),

 (1) do I have to set up my PC as a server,

 Yes.

 (2) if so what's the quickest and easiest server to get started with,

 Install Apache, PHP and MySQL. There are countless tutes on the web on how
 to do so. It is a breeze under Windows 2000

 (3) are there complications running the server on the same PC as the
client
 applications (ie my PHP code),

 No, except maybe performance

 (4) do I then download MySQL and PHP onto it, though I read PHP comes
 bundled with MySQL,

 PHP has an API to MySQL, but you have to have first a MySQL server running

 (5) will it become clear to me what host name/IP address to use to connect
 to the database (up to now I've been told by the hosting company).

 You can use a dynamic DNS set-up (look for instance www.dnsmadeeasy.com)
if
 you need a name-based address. Also a breeze to set up.

 Any other suggestions on timeouts on queries?

 Thanks,

 John






























 http://www.cantor.com
 CONFIDENTIAL: This e-mail, including its contents and attachments, if any,
 are confidential. If you are not the named recipient please notify the
 sender and immediately delete it. You may not disseminate, distribute, or
 forward this e-mail message or disclose its contents to anybody else.
 Copyright and any other intellectual property rights in its contents are
 the sole property of Cantor Fitzgerald.
  E-mail transmission cannot be guaranteed to be secure or error-free.
 The sender therefore does not accept liability for any errors or omissions
 in the contents of this message which arise as a result of e-mail
 transmission.  If verification is required please request a hard-copy
 version.
  Although we routinely screen for viruses, addressees should check
this
 e-mail and any attachments for viruses. We make no representation or
 warranty as to the absence of viruses in this e-mail or any attachments.
 Please note that to ensure regulatory compliance and for the protection of
 our customers and business, we may monitor and read e-mails sent to and
 from our server(s).

 For further important information, please read the  Important Legal
 Information and Legal Statement at
 http://www.cantor.com/legal_information.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

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



RE: [PHP-DB] Functions - scope of returned result

2003-08-14 Thread Dillon, John
To answer my own question again, I didn't assign the returned value from the
function call to a variable:

$piv_result=queries();

All OK.

-Original Message-
From: Dillon, John [mailto:[EMAIL PROTECTED]
Sent: 14 August 2003 17:54
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Functions - scope of returned result


One more bite on this code.  

function queries(){
//code..
$piv_result=mysql_db_query($db, $query, $connection) or die (Query9
failed: $query);
return $piv_result;
}

function print(){
global $piv_result;
$count_fields=mysql_num_fields($piv_result);  //ERROR: 
//code...
}

//MAIN 
queries();
print();

Should this work - $piv_result is being returned from one function and then
being used in another function.  Am I missing something?

John































   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any,
are confidential. If you are not the named recipient please notify the
sender and immediately delete it. You may not disseminate, distribute, or
forward this e-mail message or disclose its contents to anybody else.
Copyright and any other intellectual property rights in its contents are the
sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free.
The sender therefore does not accept liability for any errors or omissions
in the contents of this message which arise as a result of e-mail
transmission.  If verification is required please request a hard-copy
version.
 Although we routinely screen for viruses, addressees should check this
e-mail and any attachments for viruses. We make no representation or
warranty as to the absence of viruses in this e-mail or any attachments.
Please note that to ensure regulatory compliance and for the protection of
our customers and business, we may monitor and read e-mails sent to and from
our server(s). 

For further important information, please read the  Important Legal
Information and Legal Statement at
http://www.cantor.com/legal_information.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] adding integer to field in query

2003-08-14 Thread Dillon, John
Thanks to both responses.  In fact, it decided to work once I put 0 in the
cell that 1 was to be added to!  It seems it got it started..  1+NULL=?

-Original Message-
From: Matt Schroebel [mailto:[EMAIL PROTECTED]
Sent: 13 August 2003 15:48
To: Dillon, John; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] adding integer to field in query


Dillon, John mailto:[EMAIL PROTECTED]  wrote on Wednesday, August
13, 2003 10:24 AM:

 How do you add a number to a field within the query, ie
 without having to
 extract?  Eg
 
 $query=UPDATE Choice SET visits=(visits+1) WHERE ID='$thisID';
 
 is the above visits=(visits+1) legal, cos it doesn't work
 at the moment?
 

It's executing right?  Echo out your query statement and see what you're
asking for.


   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html


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



[PHP-DB] RE: Pivot tables

2003-08-14 Thread Dillon, John
Darn, here's the link:

http://www.mysql.com/articles/wizard/print_version.html

-Original Message-
From: Dillon, John 
Sent: 11 August 2003 19:09
To: [EMAIL PROTECTED]
Subject: Pivot tables



Here is the worth-reading mysql answer to my question below.  Pity it's
implemented on perl not PHP though...anyone know a PHP implementation?



I will need to generate a pivot table similar to that in Excel, in this
version I want to list a unique list of fields across the top and down the
side with totals - called cross-tabulations.

John


























































   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html


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



RE: [PHP-DB] Extracting result - unknown number of fields

2003-08-14 Thread Dillon, John
..but even if I can get the names and number of fields during 'run-time',
how do I make the following statement applicable to a variable number of
fields:

while(list($a,$b...)= mysql_fetch_array($result))

or is there another way to extract which would work?

John

-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: 14 August 2003 16:29
To: Dillon, John; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Extracting result - unknown number of fields


From: Dillon, John [EMAIL PROTECTED]

 While doing a cross tabulation, I've got a query which gives me a variable
 number of fields:

Maybe mysql_num_fields() and mysql_field_name() will be of use, here? Check
the manual..

---John Holmes...


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


   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html


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



[PHP-DB] Extracting result - unknown number of fields

2003-08-14 Thread Dillon, John
While doing a cross tabulation, I've got a query which gives me a variable
number of fields:

$query=SELECT Dept;
$count=count($piv_cos);
for($x=0;$x$count;$x++){
$query.=, SUM(IF(Co='$piv_cos[$x]',Exps175,0)) AS '$piv_cos[$x]';
}
$query.= FROM $tbl1 GROUP BY Dept;
$result=mysql_db_query($db, $query, $connection) or die (Query9
failed: $query);

...but how do I extract?

$piv_depts=array(); 
for($x=0;$x$count;$x++){${piv_.$x}=array();}
$piv_dept1=array();
$x=0;
while(list($a,$b)= mysql_fetch_array($result))   //I DON'T KNOW HOW
MANY TO list()
{
$piv_cos[$x]=$a;
for($y=0;$y$count;$y++){${piv_.$y}[$x]=$b;}
//...
//...
//$piv_dept1[$x]=$b;
$x++;
}

Is there an alternative approach?
Thanks,
John





































   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html


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



RE: [PHP-DB] Functions - scope of returned result

2003-08-14 Thread Dillon, John
One more bite on this code.  

function queries(){
//code..
$piv_result=mysql_db_query($db, $query, $connection) or die (Query9
failed: $query);
return $piv_result;
}

function print(){
global $piv_result;
$count_fields=mysql_num_fields($piv_result);  //ERROR: 
//code...
}

//MAIN 
queries();
print();

Should this work - $piv_result is being returned from one function and then
being used in another function.  Am I missing something?

John































   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html


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



RE: [PHP-DB] Extracting result - unknown number of fields

2003-08-14 Thread Dillon, John
OK, please ignore, I believe I've found the answer in the manual notes:

$query=your SQL;
$result=mysql_query($query) or die(Query ($query) sucks!);
$fields=mysql_num_fields($result);

echo table\ntr;
for ($i=0; $i  mysql_num_fields($result); $i++) //Table Header
{ print th.mysql_field_name($result, $i)./th; }
echo /tr\n;
while ($row = mysql_fetch_row($result)) { //Table body
echo tr;
for ($f=0; $f  $fields; $f++) {
echo td$row[$f]/td; }
echo /tr\n;}
echo /table
http://www.php.net/manual/en/function.mysql-num-fields.php

-Original Message-
From: Dillon, John [mailto:[EMAIL PROTECTED]
Sent: 14 August 2003 17:05
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Extracting result - unknown number of fields


..but even if I can get the names and number of fields during 'run-time',
how do I make the following statement applicable to a variable number of
fields:

while(list($a,$b...)= mysql_fetch_array($result))

or is there another way to extract which would work?

John

-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: 14 August 2003 16:29
To: Dillon, John; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Extracting result - unknown number of fields


From: Dillon, John [EMAIL PROTECTED]

 While doing a cross tabulation, I've got a query which gives me a variable
 number of fields:

Maybe mysql_num_fields() and mysql_field_name() will be of use, here? Check
the manual..

---John Holmes...


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


   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any,
are confidential. If you are not the named recipient please notify the
sender and immediately delete it. You may not disseminate, distribute, or
forward this e-mail message or disclose its contents to anybody else.
Copyright and any other intellectual property rights in its contents are the
sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free.
The sender therefore does not accept liability for any errors or omissions
in the contents of this message which arise as a result of e-mail
transmission.  If verification is required please request a hard-copy
version.
 Although we routinely screen for viruses, addressees should check this
e-mail and any attachments for viruses. We make no representation or
warranty as to the absence of viruses in this e-mail or any attachments.
Please note that to ensure regulatory compliance and for the protection of
our customers and business, we may monitor and read e-mails sent to and from
our server(s). 

For further important information, please read the  Important Legal
Information and Legal Statement at
http://www.cantor.com/legal_information.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



[PHP-DB] adding integer to field in query

2003-08-14 Thread Dillon, John
How do you add a number to a field within the query, ie without having to
extract?  Eg

$query=UPDATE Choice SET visits=(visits+1) WHERE ID='$thisID';

is the above visits=(visits+1) legal, cos it doesn't work at the moment?

Thanks,

John
























   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html


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



[PHP-DB] Pivot tables

2003-08-12 Thread Dillon, John

Here is the worth-reading mysql answer to my question below.  Pity it's
implemented on perl not PHP though...anyone know a PHP implementation?



I will need to generate a pivot table similar to that in Excel, in this
version I want to list a unique list of fields across the top and down the
side with totals - called cross-tabulations.

John


























































   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html


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



RE: [PHP-DB] SQLT question: LEFT JOIN

2003-08-01 Thread Dillon, John
I want all the records from two joined tables but where the JOIN applies
(say I join on the ID field and not all LEFT table IDs are in the RIGHT
table) I only want the records which comply with a test.  I tried:

SELECT tbl1.fld1, tbl2.fld1 FROM tbl1 LEFT JOIN tbl2 ON tbl1.ID=tbl2.ID
WHERE tbl2.test=yes

I only want to apply the test where the join applies.  Can anyone suggest a
solution?  I was thinking of: tbl2.test!=no.

It's actually a bit more complicated: I have a few WHERE conditions as
follows:
WHERE (tbl2.test=yes  tbl2.other=yestoo)  tbl1.thistest=no

Regards,

John


   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html


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



RE: [PHP-DB] session problem

2003-07-23 Thread Dillon, John
This is advertising a porno site.

-Original Message-
From: tana dsasa [mailto:[EMAIL PROTECTED]
Sent: 23 July 2003 11:11
To: [EMAIL PROTECTED]
Subject: [PHP-DB] session problem


I have installed an user-login aplication on my website ( 
http://www.norbertnet.ro ) but i have problems with session controls.
I receive all kinds of warnings and i don't know how to interpret them
 
thanks advanced




-
Want to chat instantly with your online friends? Get the FREE
Yahoo!Messenger


   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html


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



[PHP-DB] Query fails after changing column name using Mascon

2003-07-03 Thread Dillon, John
When I change the name of a field the mysql query fails (using the new field
name).  It works if I change to an existing field.  If I change that field
name query doesn't work (having amended the query).  Sounds like my table is
not being updated to new field name, so query doesn't find the new field.

Has anyone come across this problem using Mascon (scibit.com) to update the
table, field?

John
























   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html


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



[PHP-DB] POSTed form and address

2003-06-26 Thread Dillon, John
I have a simple page saying: if(password is correct){then print the page}
otherwise {print the login form}.  The login form uses the method=post.  But
the page I get back has the form values: login details, in the address line.
I thought get gave you the variables in the address line and with post you
just saw the page's address, without parameters after it, like ?pw=something
etc.  No?

John











































   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html


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



[PHP-DB] RE: POSTed form and address

2003-06-26 Thread Dillon, John
Sorry people.  My page was not refreshing properly.  In future, I'll use
version numbers to know what I'm looking at.

-Original Message-
From: Dillon, John 
Sent: 26 June 2003 17:29
To: [EMAIL PROTECTED]
Subject: POSTed form and address


I have a simple page saying: if(password is correct){then print the page}
otherwise {print the login form}.  The login form uses the method=post.  But
the page I get back has the form values: login details, in the address line.
I thought get gave you the variables in the address line and with post you
just saw the page's address, without parameters after it, like ?pw=something
etc.  No?

John











































   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html


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



[PHP-DB] POSTing page

2003-06-24 Thread Dillon, John
If someone POSTs information - using action=yourpage from theirpage (using a
copy of the form on yourpage - can you tell where what theirpage is, ie
where the information was POSTed from?

John





























http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html


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



[PHP-DB] check boxes and php

2003-03-27 Thread Dillon, John
I want to create a page where the user will have a list of its favorites and
by ticking a box opposite the item will be able to delete it by clicking the
submit button.  I want to make this dynamic so that the php works out the
one to delete based on the value of the tickbox (I'm thinking), having first

- done a query to retrieve the favorites of the user
- listed the favorites on the browser and set the tick boxes with a value
corresponding to the ID of the favorite...thus knowing which one to delete.

I was wondering what's the best approach - the one above or to mix in some
javascript?  Any examples out there?  I know it's a popular idea.  Maybe
there's a better approach than tickboxes.

John




   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html


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