RE: [PHP-DB] Acessing a excel worksheet from a php site

2004-02-06 Thread Griffiths, Daniel
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

RE: [PHP-DB] Acessing a excel worksheet from a php site

2004-02-06 Thread Griffiths, Daniel
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

RE: [PHP-DB] From MySQL to EXCEL

2004-02-02 Thread Griffiths, Daniel
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

RE: [PHP-DB] Need help!!!

2003-12-12 Thread Griffiths, Daniel
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

RE: [PHP-DB] faster imagecreatefromjpeg

2003-10-17 Thread Griffiths, Daniel
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

RE: [PHP-DB] update db with variables

2003-09-24 Thread Griffiths, Daniel
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

RE: [PHP-DB] Query Filter in GUI

2003-09-22 Thread Griffiths, Daniel
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]

RE: [PHP-DB] What are your DB driven/template strategies?

2003-09-02 Thread Griffiths, Daniel
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

RE: [PHP-DB] Simple field replace...?

2003-08-28 Thread Griffiths, Daniel
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]

RE: [PHP-DB] MySQL, PHP or ghost?

2003-08-27 Thread Griffiths, Daniel
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

RE: [PHP-DB] MySQL, PHP or ghost?

2003-08-27 Thread Griffiths, Daniel
:[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

RE: [PHP-DB] Saving MySQL data as an Excel Spreadsheet...?

2003-08-20 Thread Griffiths, Daniel
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

RE: [PHP-DB] problem with undefined variable

2003-06-04 Thread Griffiths, Daniel
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

RE: [PHP-DB] problem with undefined variable

2003-06-04 Thread Griffiths, Daniel
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

RE: [PHP-DB] another redirecting question

2003-05-31 Thread Griffiths, Daniel
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

RE: [PHP-DB] another redirecting question

2003-05-31 Thread Griffiths, Daniel
, 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

[PHP-DB] MySQL Query help please!

2003-03-12 Thread Griffiths, Daniel
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

RE: [PHP-DB] MySQL Query help please!

2003-03-12 Thread Griffiths, Daniel
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

RE: [PHP-DB] Reporting tool for stats pulled from MySQL db

2003-02-25 Thread Griffiths, Daniel
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

RE: [PHP-DB] How to access a MS Access DB

2003-02-14 Thread Griffiths, Daniel
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:

[PHP-DB] select from multi tables

2003-02-03 Thread Griffiths, Daniel
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,

RE: [PHP-DB] Re: select from multi tables

2003-02-03 Thread Griffiths, Daniel
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

RE: [PHP-DB] MSSQL Problems

2002-12-05 Thread Griffiths, Daniel
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:

RE: [PHP-DB] Dbase module won't work

2002-11-22 Thread Griffiths, Daniel
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]

[PHP-DB] MySQL Problem

2002-11-21 Thread Griffiths, Daniel
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'

RE: [PHP-DB] MySQL Problem

2002-11-21 Thread Griffiths, Daniel
: 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

RE: [PHP-DB] MySQL Problem

2002-11-21 Thread Griffiths, Daniel
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

[PHP-DB] formatted text, php and mysql

2002-11-19 Thread Griffiths, Daniel
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

RE: [PHP-DB] formatted text, php and mysql

2002-11-19 Thread Griffiths, Daniel
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

RE: [PHP-DB] Re: The noob is back! About this directory security...

2002-10-03 Thread Griffiths, Daniel
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)

RE: [PHP-DB] Session understanding

2002-09-26 Thread Griffiths, Daniel
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