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
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
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
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
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
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
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
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
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
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
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
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
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
:
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
: 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
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;
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);
($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
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
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
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
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
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
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
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
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
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
42 matches
Mail list logo