I dont know any way to actually open and read the file with php, havent come across
any classes or methods that will do this.
My solution when I had this problem was to do it in 2 parts, run a macro on the excel
file that will extract the data to a text file and then use php to read that into
then that won't work as you have no control over the
data.
what sort of data is in the excel files?
-Original Message-
From: Ricardo Lopes [mailto:[EMAIL PROTECTED]
Sent: 06 February 2004 09:22
To: Griffiths, Daniel
Cc: PHP DB
Subject: Re: [PHP-DB] Acessing a excel worksheet from a php site
In my
theres an easy way if its a simple data table type spreadsheet your after, this works
like a treat, at the top of your page that produces the data put -
header(Content-Type: application/vnd.ms-excel);
header(Content-Disposition: attachment; filename=\file.xls\);
remember that your sending
how are you getting the $tutor_id var?, in your script you are using $action =
$_GET[action]; so you will need to define $tutor_id like $tutor_id =
$_GET['tutor_id'], or just use $_GET['tutor_id'].
a form can only put variables in the POST array OR the GET array, and if your using
hyperlinks
you said it yourself, cut the image up into lots of parts first in photoshop or
whatever, keep at track of the grid refs that go with which bit of the image and only
show the part or parts of the image that you need at anyone time.
-Original Message-
From: Georgescu Vlad [mailto:[EMAIL
put some single quotes around $value in your SQL statement.
-Original Message-
From: Robbie Staufer [mailto:[EMAIL PROTECTED]
Sent: 24 September 2003 16:21
To: [EMAIL PROTECTED]
Subject: [PHP-DB] update db with variables
Hi,
I'm writing an application that will display the contents of
how are you testing the check boxes?, looks like the the query string is empty because
both the tests you are doing in the code below return false.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 22 September 2003 15:01
To: [EMAIL PROTECTED]
Subject: [PHP-DB]
You can use a custom 404 error page to redirect everything through your initialization
file, set this up in the apache conf files (exaclty which one depends on your distro),
just search for 404 in them and you'll find the right location, not sure about IIS.
links are then given names as you
like Jacob said, use the string functions of mysql in the actual SQL statment, not php.
http://www.mysql.com/doc/en/String_functions.html
UPDATE TABLE SET FIELD = SUBSTRING(FIELD,33)
33 as you will want to delete the 32'nd char
-Original Message-
From: [EMAIL PROTECTED]
its nothing to do with php as your working from the shell in your eg.
mysql will default to 2000 for a year value if you pass it as an entry because it
will accept short values for the years this century, eg pass it 1 and it'll give you
2001, so it thinks is nothing. if you want to default to
:[EMAIL PROTECTED]
Sent: 27 August 2003 15:29
To: Griffiths, Daniel
Subject: RE: [PHP-DB] MySQL, PHP or ghost?
On Wed, 27 Aug 2003, Griffiths, Daniel wrote:
mysql will default to 2000 for a year value if you pass it as an entry
because it will accept short values for the years this century, eg
you can also send the appropraite headers to output directly to excel from the
browser, i.e something like this:-
? if($_GET['FORMAT'] == 'XLS'){
header(Content-Type: application/vnd.ms-excel);
header(Content-Disposition: inline; filename=\file.xls\);
}
?
this needs to be at the very start of
register_globals must be turned on on your webserver and off on your local server, you
are getting the new value for first rec from the GET array registering first_var as a
global. Same thing for the PHP_SELF error.
So change this you need to get the value of $first_var like
sorry, had written first_var instead of first_rec for some reason, should make more
sense now!
register_globals must be turned on on your webserver and off on your local server, you
are getting the new value for first_rec from the GET array registering first_rec as a
global. Same thing for
use javascript for your redirects then you wont have these problems
-Original Message-
From: Rick Dahl [mailto:[EMAIL PROTECTED]
Sent: 30 May 2003 15:43
To: [EMAIL PROTECTED]
Subject: [PHP-DB] another redirecting question
The scripts I need to run before I redirect automatically send
, Richard [mailto:[EMAIL PROTECTED]
Sent: 30 May 2003 15:47
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] another redirecting question
If the user has disabled JavaScript in the browser doesn't that create
another problem?
-Original Message-
From: Griffiths, Daniel [mailto:[EMAIL PROTECTED
Hi all,
I have 2 tables that I need to extract data from, say PORTS and STATS.
PORTS contains a list of Sea Ports in PORT i.e. : -
PORTS.PORT
UK
FRANCE
GERMANY
NETHERLANDS
SPAIN
ITALY
STATS contains a few thousand records that with among other things has the elements
Message-
From: Mark [mailto:[EMAIL PROTECTED]
Sent: 12 March 2003 15:36
To: Griffiths, Daniel
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL Query help please!
I just set up a test db using your info, and the query you have
worked ok. It provided a zero. Here's what I have (slightly modified
This is the easiest way but depending on what brouser you use and what version of
excel you have the results vary somewhat, try using Content-Disposition: inline and
then saving the the file from there, this works best for me, but its by no means
perfect. I seem to recall that someone posted a
to set up a DSN go to control panel and then Administrative Tools then into Data
Sources and then add a new system DSN.
you can probably work the rest out as its fairly straight forward.
-Original Message-
From: Jonathan Villa [mailto:[EMAIL PROTECTED]]
Sent: 13 February 2003 22:48
To:
Hi All,
I have a situation where I need to get data from more than one table, but where the
fields in the table are identical, the two tables are holding data for different
years. The queries I would like to execute would be something along the lines of this:
-
SELECT SUM(T1.F1) AS C1,
thanks, i think your probably right.
Another problem I have is trying to sum the totals of F1 over muliple tables, what I
would like is to be able to use the UNION statement but my site is hosted and they are
not using version 4x of MySQL.
Is there any work around for this using a single SQL
mssql_close() doesnt do anything when you use mssql_pconnect as this is a persistant
connection. If you want to close the connection after you've finnished with it you
should use mssql_connect() instead.
Hope this helps
-Original Message-
From: Tim Evans [mailto:[EMAIL PROTECTED]]
Sent:
might sound like a silly question but you do have php_dbase.dll under
c:\php\ , when I installed php on a windows machine it put all the extentions in
c:\php\extentions\
-Original Message-
From: J Veenhuijsen [mailto:[EMAIL PROTECTED]]
Sent: 22 November 2002 10:04
To: [EMAIL PROTECTED]
Hi,
I have a problem with an MySQL statement that is driving me mad, I'm using php to
connect to the database. this is it : -
SELECT LINE,SUM(IF(MONTH=2,WB.TEU,0)) AS '2' ,SUM(IF(MONTH=3,WB.TEU,0)) AS '3'
,SUM(IF(MONTH=4,WB.TEU,0)) AS '4' ,SUM(IF(MONTH=5,WB.TEU,0)) AS '5'
: 21 November 2002 16:41
To: Griffiths, Daniel; PHP List
Subject: RE: [PHP-DB] MySQL Problem
Maybe I'm missing something - but the MySQL statement looks right ...
How are you displaying the results?
-Original Message-
From: Griffiths, Daniel [mailto:[EMAIL PROTECTED]]
Sent: 21 November
the month starts at 1, at the moment I'm just hard coding the month into the statment.
-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: 21 November 2002 16:55
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL Problem
On Friday 22 November 2002 00:46, Griffiths
Hi, hopefully someone can help me out with this..
I need to be able to copy text from a document, keeping carriage returns and white
space chars, into a database and output the same to a web page.
I have a field in a mysql table of type 'longtext' into which i can load text and keep
the white
great, works like a dream!
many thanks
Dan
-Original Message-
From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
Sent: 19 November 2002 17:12
To: Griffiths, Daniel; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] formatted text, php and mysql
Have you looked at the nl2br() function?
echo
you could put your php scipts that contain senstive stuff like database logins and
passwords etc in a dir thats not under the public_html dir (or whatever yours is) i.e.
under your root you might have 'public_html', 'tmp', 'cgi-bin' etc. create a dir and
call it what you like ('php' would do)
in the same way that you can read included .js
and .css files.
-Original Message-
From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]]
Sent: 26 September 2002 15:57
To: Griffiths, Daniel; Steve Bradwell; Rodrigo; PHP
Subject: RE: [PHP-DB] Session understanding
Can't you get
31 matches
Mail list logo