Re: [PHP-DB] Read file

2003-11-19 Thread Neil Smth
It's usually easier to show with an example : This took about 30 minutes to write : Here's an XML file - copy and paste, and save as hotels.xml : 1 Bangkok oriental 50 High Street, Kowloon +12 451 708 3282

[PHP-DB] Re: Subject: Hitcounter works on production server but not on localhost

2003-11-20 Thread Neil Smth
Its not a permissions thing. You need to ensure that you provide PHP with a full path to the hit counter file : countrerlog.txt is a relative path. c:\\Inetpub\\wwwroot\\WCBE\\countrterlog.txt is a full path. You need to do the same with the relative path to FX_DataCounter/wcbecounter.txt as wel

Re: Re: [PHP-DB] Read file

2003-11-20 Thread Neil Smth
t" id="list" onchange="populatevalues()"></select> Phone : <input type="text" name="phone" id="phone" size="15" maxlength="24" /> <br /> <textarea name="address" id="address" rows=&q

[PHP-DB] Re: Subject: Strange bahavior with mysql_fetch_array($result)

2003-11-21 Thread Neil Smth
If $result is returning a resource ID, this is because you have also used $result in the mysql_connect call. You have probably also turned off error_reporting in your script, as it should throw an error for the 'if (! mysql_fetch_array...' line. The correct check is 'if (mysql_num_rows()==0)' w

[PHP-DB] Re: Send formmail data to Email and Database

2003-11-24 Thread Neil Smth
Since you didn't feel it necessary to include your form processing code, and as we're not mind readers, we are unable to help you. Sorry, better luck next time. Cheers - Neil. At 07:57 24/11/2003 +, you wrote: PHP List stats since 1997: http://zirzow.dyndns.org/html/mlists/ From: "how

[PHP-DB] Re: Send formmail data to Email and Database

2003-11-24 Thread Neil Smth
At 20:04 24/11/2003 +, you wrote: From: "howard gramer" <[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Re: Send formmail data to Email and Database What a sweet way to greet someone on their first post! Nice to meet you too! I''m not here to hold your hand or monitor for new g

[PHP-DB] Re: Subject: Extracting values from an array (I think)

2003-11-24 Thread Neil Smth
Get your array from mysql_fetch_assoc() you can then use as an alternative, the extract() function : http://uk2.php.net/manual/en/function.extract.php Cheers - Neil. At 20:04 24/11/2003 +, you wrote: To: [EMAIL PROTECTED] MIME-Version: 1.0 From: [EMAIL PROTECTED] Date: Mon, 24 Nov 2003 12:4

[PHP-DB] Re: Subject: Empty Table command?

2003-11-27 Thread Neil Smth
TRUNCATE TABLE tablename in MySQL is much faster (to return) than DELETE FROM since it doesn't log the deletes, it just writes a zero marker to the file. (Hehe, Rasmus knows better than that too ! Must be having an off-day there !) Cheers, Neil. At 12:38 27/11/2003 +, you wrote: From: "Chr

Re: [PHP-DB] Downloading PHP source from a PHP filename, possible?

2003-11-30 Thread Neil Smth
The only real way to do this is to set up a web service on domain 2 which responds to page requests by pulling the source directly as a file, without interpreting it as PHP code. The function to use here is readfile("/path/to/my/php/scripts/on/webserver.php"); You might also want to set a heade

[PHP-DB] Subject: Dynamic Website Question!

2003-12-01 Thread Neil Smth
Sure, you can try using the xmlhttp methods available in IE5+ or Mozilla / Netscape 7 (look up the docs on msdn.microsoft.com and mozilla.org). You might try getting away with a smaller screen refresh, or using a hidden but self-refreshing iframe and some Javascript Else, no, you're stuck with

[PHP-DB] Subject: International Addresses and Telephones

2003-12-06 Thread Neil Smth
Did you try http://www.bitboost.com/ref/international-address-formats.html#Formats, found as first hit by simply googling for "international address formats" ?!?! Cheers - Neil. At 07:23 05/12/2003 +, you wrote: Message-ID: <[EMAIL PROTECTED]> From: "Rankin, Randy" <[EMAIL PROTECTED]> To: "

[PHP-DB] Grouping and ordering - tricky problem, suggestions welcome

2003-12-11 Thread Neil Smth
Hi All - I have a query as below, which builds individual records from a series of 4 tables SELECT menuitems.tour_code, image_caption, image_code, region, country, product_type FROM tourcountries, tour_product, countries, menuitems LEFT OUTER JOIN

Re: [PHP-DB] Re: Re:DB, XML and & sign

2003-12-19 Thread Neil Smth
ns? Regards, Muhammed Mamedov - Original Message - From: "Neil Smth" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, December 19, 2003 2:27 AM Subject: Re:Subject: DB, XML and & sign htmlspecialchars() will deal with the foll

[PHP-DB] Re: Subject: PHP/DB speed

2003-12-22 Thread Neil Smth
0.9 seconds doesn't sounds too bad to me! Although, you haven't told us how big each record is, only that you have 2500 of them ! So we cannot guess. However, I would investigate the PHP gzip functions along with ob_start() so that your output can be zipped before sending to the client. Is the

[PHP-DB] Re:Dilemma (PDA based solution??)

2003-12-26 Thread Neil Smth
You haven't specified the operating environment of the PDA (WinCE ? Linux ? ) or what it supports. Certainly I wouldn't bother setting up a *server* environment on a PDA ! Without any specific examples of the technology / techniques you are trying to expose though, its difficult to advise :

[PHP-DB] Re: Subject: file upload into mySQL

2003-12-26 Thread Neil Smth
Something is wrong with your query : Imagine - you are sending a file to MySQL from the $_FILES array. And I think , that the syntax is wrong (it should be files["filename"]["tmp_name"] cause this is a temporary file). Also it is likely that MySQL does not have permissions to access the tempora

RE: [PHP-DB] Dilemma (PDA based solution??)

2003-12-26 Thread Neil Smth
Try these, the techniques are pretty much the same for all platforms (Pass a SOAP message which requests a method to be run on the remote server) : Maybe look on the PEAR site for PEAR::SOAP as well ? http://www.xmethods.com/ve2/ViewListing.po?serviceid=2 http://www.onlamp.com/pub/a/php/2003/07/

[PHP-DB] Subject: Categories and Items query

2003-12-31 Thread Neil Smth
At 01:11 31/12/2003 +, you wrote: To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> Date: Tue, 30 Dec 2003 12:30:06 -0500 From: Ali Van Doren <[EMAIL PROTECTED]> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Categories a

[PHP-DB] Re: Subject: grabbing text from a webpage and putting it in a query.

2004-01-03 Thread Neil Smth
At 01:49 03/01/2004 +, you wrote: Message-ID: <[EMAIL PROTECTED]> Date: Sat, 3 Jan 2004 12:04:11 +1100 (EST) From: JeRRy <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: grabbing text from a webpage

[PHP-DB] Re Subject: SQL WHERE datetime > NOW

2004-01-03 Thread Neil Smth
Presumably where you are generating TO_DAYS(NOW()) you meant to say TO_DAYS(NOW())+1 ? (which is days *after* today !) Also, you did not specify how it "does not work" - can you be mroe descriptive, what error message did you receive, how many rows did you expect and get out ? Cheers - Neil.

[PHP-DB] Re: Subject: grabbing text from a webpage and putting it in a query.

2004-01-04 Thread Neil Smth
At 08:03 04/01/2004 +, JeRRy wrote: $matcharray=array("Brisbane Lions v Collingwood at Gabba (night)"); This will only work for that game matching the names right? I'd like to run some query or maybe 2 or 3 MAX Wrong. I guess you didn't read the code, the comments, or the chapter on php.ne

[PHP-DB] Re: Subject: MySQL general Question...

2004-01-16 Thread Neil Smth
There is no difference, in the way you wrote it. However, if you used wildcards you could match as follows : SELECT & FROM my_table WHERE 'email' LIKE '[EMAIL PROTECTED]' // Match all addresses at hotmail.com SELECT & FROM my_table WHERE 'email' LIKE '[EMAIL PROTECTED]' // Match all user names be

[PHP-DB] Re: Subject: Different character sets

2004-01-20 Thread Neil Smth
Regarding carriage returns showing up - this is simple : Look at any HTML page source. You will see it is littered with many carriage returns, long areas with many spaces and so on. In HTML, the spaces (more than one) are condensed into one space, and carriage returns are not significant sas th

[PHP-DB] Re: Inserting querydata as default value in form

2004-01-28 Thread Neil Smth
When will people learn that attributes in HTML ,and *especially* in forms MUST BE QUOTED ! This will really really screw you up if you ever have to make an xhtml page (and you'll be back here again). Please please get into this practice, it will save you a lot of headaches even short term. So,

[PHP-DB] Re:Subject: multiple tables and amounts

2004-01-29 Thread Neil Smth
Would this work better ? SELECT comments.id, comments.phid, COUNT(comments.id) AS comments, COUNT(ratings.id) AS ratings FROM photos LEFT OUTER JOIN comments ON photos.id=comments.phid LEFT OUTER JOIN ratings ON photos.id=ratings.phid WHERE photos.id=1 GROUP BY comments.id, comments.phid (You can

[PHP-DB] Re: Subject: getting font size from browser

2004-01-31 Thread Neil Smth
Read this then go away, this is not a CSS or javascript list. http://www.alistapart.com/articles/elastic/ At 13:23 30/01/2004 +, you wrote: Message-ID: <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Reply-To: "Roy G. Vervoort" <[EMAIL PROTECTED]> From: "Roy G. Vervoort" <[EMAIL PROTECTED]> Date: F

[PHP-DB] Re: Subject: multiple fields all unique?

2004-02-04 Thread Neil Smth
Jason - you posted this a 5 weeks ago and received several answers. http://www.phpdiscuss.com/article.php?id=32225&group=php.db You say you have written your own code, but you have not attached it. As Peter said, the key is probably to declare those columns unique then allow the database to deter

[PHP-DB] Re: Querying tables on multiple hosts in a single query1

2003-10-15 Thread Neil Smth
I found this http://www.inspireonsoftware.com/Products-MyPQuery.htm Does it look like a workable solution (paritioning by customer was one of the applications mentioned). The 30 day trial looks worth a shot, they calm licensing of $450 per host. Cheers - Neil Smith. Message-ID: <[EMAIL PROTECT

Re: [PHP-DB] Help with file upload

2003-10-16 Thread Neil Smth
Bunmi, you need to understand Unix file permissions. Because you are running as the web server 'user / group' that user needs permission to write to the directory you are specifying. In this case you are trying to circumvent filesystem access controls by writing directly to the root directory o

Re: [PHP-DB] Help with file upload

2003-10-16 Thread Neil Smth
At 18:44 16/10/2003 +, you wrote: From: Ruprecht Helms <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: Bunmi Akinmboni <[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED] Content-Type: text/plain Message-Id: <[EMAIL PROTECTED]> Mime-Version: 1.0 Date: 16 Oct 2003 15:12:38 +0200 Content-Transfer-Encod

[PHP-DB] Re:SQL type queries on arrays?

2003-10-21 Thread Neil Smth
Why not use an actual SQL query which is optimised to be faster than string processing ? You would probably get more mileage from loading the CSV into a pre-formed table with an index, in MySQL (this operation is very fast). I've loaded 5000 records from a CSV in 5 millisec into MySQL on a P500

[PHP-DB] Re: Subject: mysql field comparison to multiple variables

2003-10-26 Thread Neil Smth
At 11:24 26/10/2003 +, you wrote: Message-ID: <[EMAIL PROTECTED]> Date: Fri, 24 Oct 2003 21:45:54 -0400 From: Mike Baerwolf <[EMAIL PROTECTED]> MIME-Version: 1.0 To: [EMAIL PROTECTED] Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: mysql field

[PHP-DB] Re: Subject: mysql field comparison to multiple variables

2003-10-26 Thread Neil Smth
At 11:24 26/10/2003 +, you wrote: From: Mike Baerwolf <[EMAIL PROTECTED]> Subject: mysql field comparison to multiple variables Hello, I trying to put together a sql statement that will pull records based on a date field. I can't figure out how to compare the date field to multiple php var

[PHP-DB] Re:Subject: KB in a query / column?

2003-11-04 Thread Neil Smth
SELECT SUM(LENGTH(Comments))/1000 FROM table Kinda obvious now isn't it ;-) Cheers - Neil. At 11:19 04/11/2003 +, you wrote: Message-ID: <[EMAIL PROTECTED]> From: "Chris Payne" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Date: Mon, 3 Nov 2003 14:38:34 -0500 MIME-Version: 1.0 Content-Type: mul

[PHP-DB] Re:Subject: KB in a query / column?

2003-11-04 Thread Neil Smth
SELECT SUM(LENGTH(Comments))/1000 FROM table Kinda obvious now isn't it ;-) Cheers - Neil. At 11:19 04/11/2003 +, you wrote: Message-ID: <[EMAIL PROTECTED]> From: "Chris Payne" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Date: Mon, 3 Nov 2003 14:38:34 -0500 MIME-Version: 1.0 Content-Type: mul

[PHP-DB] Re: Adding in MySQL

2003-11-11 Thread Neil Smth
UPDATE fieldname SET fieldname=fieldname+1 WHERE where condition Make sure to have a WHERE condition, or you will update all the 'fieldname' entries in your table - you have been warned. PS - Didn't look very hard on mysql.com, did you ;-p PPS - Please can you stop posting 40 empty lines to the

[PHP-DB] Re: php-db Digest 18 Nov 2003 00:56:30 -0000 Issue 2129

2003-11-18 Thread Neil Smth
Mod rewrite is an excellent solution with many applications. However it has absolutely no effect on session variables declared at the site root ( / ) level. When a session is started, PHP passes the browser a cookie containing a session ID (a 32 byte MD5 string) which is used to reference a ses

Re: Re: [PHP-DB] Read file

2003-11-18 Thread Neil Smth
You would benefit from using XML for these data structures. XSLT can be used to quickly filter records stored on the clients computer locally. The client can then make changes to desired records and upload the XML file fragment to the server. The server then has a much lower load as it only has