Re: [PHP-DB] PHP sitemap

2004-07-13 Thread Ignatius Reilly
For some of my sites I use a XML file to list all the pages in a structured manner (sections, access rights, etc.) I generate the site map by using a XSLT sheet. _ - Original Message - From: "Dermot Mc Laughlin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tues

Re: [PHP-DB] Validate value

2004-07-13 Thread Rinku
Thank you, Very much !!! It worked fine. Regards, Rinku "Jensen, Kimberlee" <[EMAIL PROTECTED]> wrote: 1. You have to allow for a space in your pattern - you can do so by hitting the space bar or using \s. Here are some options $pattern="/^[a-zA-Z ]+$/"; if(preg_match($pattern,$_POST['

[PHP-DB] Grab a range of rows from a mysql result

2004-07-13 Thread [EMAIL PROTECTED]
I need to grab a range of rows from a mysql result resource. The resource is made up of 1000+ records from a mysql table that I am breaking up to make my PHP application run faster. I have figured out how to compute the range but I don¹t know how to pull out a group of rows within a range from a

[PHP-DB] Re: [PHP] Grab a range of rows from a mysql result

2004-07-13 Thread John W. Holmes
[EMAIL PROTECTED] wrote: The resource is made up of 1000+ records from a mysql table that I am breaking up to make my PHP application run faster. I have figured out how to compute the range but I don¹t know how to pull out a group of rows within a range from a mysql result resource. $query = "SELE

Re: [PHP-DB] Getting a result from MAX() query

2004-07-13 Thread boclair
"John W. Holmes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > [EMAIL PROTECTED] wrote: > > Would somebody be kind enough to explain why this query produces a false result > > > > $latest=mysql_query("SELECT MAX(fee_recd) FROM members",$connectup)or die > > ("Query failed:$latestEr

Re: [PHP-DB] Mysql and rollbacks

2004-07-13 Thread Martin Marques
On Tue, 13 Jul 2004, Peter Westergaard wrote: > I'm developing a site where I anticipate the need to make several updates to > several forms, and I'll want to "commit" them all at once (i.e. if there's a > failure with any of the transactions, I'd like to be able to back out to > before I started)

Re: [PHP-DB] fetch row DISTINCT

2004-07-13 Thread Martin Marques
On Fri, 9 Jul 2004, Peter Westergaard wrote: > > One idea that occurs to me, and it's a tradeoff from Torsten's idea (which > is to read the whole database, and parse out the unique rows), is to first > execute your "SELECT DISTINCT distinct_col FROM table", and then walk > through that, and for ea

[PHP-DB] PHP 5.0.0 Released!

2004-07-13 Thread Andi Gutmans
The PHP development team is proud to announce the official release of PHP 5. Some of the key features of PHP 5 include: - The Zend Engine II with a new object model and dozens of new features. - XML support has been completely redone in PHP 5, all extensions are now focused around the excellent li

Re: [PHP-DB] Mysql and rollbacks

2004-07-13 Thread Kim Steinhaug
I was about to suggest the same, the latest builds of MySQL have theese functions from what I knew... I think youll find what you need there. -- Kim Steinhaug - There are 10 types of people when it comes to binary numbers: tho

[PHP-DB] PHP sitemap

2004-07-13 Thread Dermot Mc Laughlin
Hi, Is it possible/easy to create a simple sitemap page using PHP which would automatically parse all files and directories from index.html and create a structured HTML document from the results? I'm just a newcomer to this field, but have some experience in programming and web development. I

[PHP-DB] Re: map algorithm

2004-07-13 Thread Manuel Lemos
Hello, On 07/07/2004 03:41 PM, Matt Perry wrote: I have written a shortest point algorithm that takes a number of addresses and finds the best delivery route. Yahoo maps finds the distances between two addresses but I cannot seem to find out how to grab the results and use them in my algorithm.

Re: [PHP-DB] Multiple SELECT

2004-07-13 Thread Pablo M. Rivas
Hello Marcjon, do this: "SELECT forumusers.*, forumuserprofiles.* from ".$godlyness['database_database'].".forumusers LEFT JOIN ".$godlyness['database_database'].".forumuserprofiles ON forumusers.username = forumusersprofiles.username where order by" so.. if you do: wh

Re: [PHP-DB] Column help needed (Table)

2004-07-13 Thread Pablo M. Rivas
Hello Chris, easy as this? "; $odd=0; } else $odd=1; echo "" . $row[0] . ""; } ?> CP> Hi there everyone, CP> I need my MySQL query to be displayed in a table, which is no problem, but I CP> only want 2 results per row to be displayed - so if I h

RE: [PHP-DB] Security Issues

2004-07-13 Thread Ed Lazor
> so I've been doing a little thinking about web server security.. > > #1. Since all files on the web are 644, what is to stop someone on the > same server from copying your files to their own directory? > (specifically your database connection info) > #2. if a folder if 777, what's to stop someon

Re: [PHP-DB] Security Issues

2004-07-13 Thread John W. Holmes
Jonathan Haddad wrote: so I've been doing a little thinking about web server security.. #1. Since all files on the web are 644, what is to stop someone on the same server from copying your files to their own directory? (specifically your database connection info) #2. if a folder if 777, what's t

[PHP-DB] Security Issues

2004-07-13 Thread Jonathan Haddad
so I've been doing a little thinking about web server security.. #1. Since all files on the web are 644, what is to stop someone on the same server from copying your files to their own directory? (specifically your database connection info) #2. if a folder if 777, what's to stop someone from wri

Re: [PHP-DB] Re: Mysql and rollbacks

2004-07-13 Thread John W. Holmes
Peter Westergaard wrote: ... or, am I barking up the wrong tree with Mysql, and should I change database platforms? (You'll never convince me to give up PHP though. muahaha. Except for sql-level stored procedures where necessary, that is). Maybe? :) PostgreSQL and Firebird are two other open sourc

RE: [PHP-DB] Re: Mysql and rollbacks

2004-07-13 Thread Hutchins, Richard
If memory serves me correctly, a couple of the PEAR database abstraction classes support rollback functionality. Of course, YMMV. Rich > -Original Message- > From: Peter Westergaard [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 13, 2004 11:24 AM > To: [EMAIL PROTECTED] > Subject: [PHP-D

Re: [PHP-DB] Mysql and rollbacks

2004-07-13 Thread John W. Holmes
Peter Westergaard wrote: I'm developing a site where I anticipate the need to make several updates to several forms, and I'll want to "commit" them all at once (i.e. if there's a failure with any of the transactions, I'd like to be able to back out to before I started). Is there a decent way to do

[PHP-DB] Re: Mysql and rollbacks

2004-07-13 Thread Peter Westergaard
... or, am I barking up the wrong tree with Mysql, and should I change database platforms? (You'll never convince me to give up PHP though. muahaha. Except for sql-level stored procedures where necessary, that is). -P -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: htt

[PHP-DB] Mysql and rollbacks

2004-07-13 Thread Peter Westergaard
I'm developing a site where I anticipate the need to make several updates to several forms, and I'll want to "commit" them all at once (i.e. if there's a failure with any of the transactions, I'd like to be able to back out to before I started). Is there a decent way to do this with PHP and Mysql?

Re: [PHP-DB] mysql auto increment

2004-07-13 Thread Jonathan Haddad
There might be some system that requires a 4 digit number and the PK is being used directly. Also, this same system might need to be exported to Excel, which trims leading zeros and is generally a pain in the ass. Peter Westergaard wrote: I've done exactly this for a really cheap-and-dirty ins

Re: [PHP-DB] mysql auto increment

2004-07-13 Thread Peter Westergaard
I've done exactly this for a really cheap-and-dirty instance where two people were doing bulk data entry into two different instances of a mysql table which would eventually be stitched together. by giving one a higher range, the data migration afterwords was very easy. Other than that, can't ima

Re: [PHP-DB] Table locking

2004-07-13 Thread Peter Westergaard
"Rosen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have an orders with one main record in table1 ( client, date, e.t.c. ) and > detail description in table2 ( all materials with quant, price, e.t.c. ) > and I save data in table1 for positions (range of id - autoinc field of

Re: [PHP-DB] Getting a result from MAX() query

2004-07-13 Thread John W. Holmes
[EMAIL PROTECTED] wrote: Would somebody be kind enough to explain why this query produces a false result $latest=mysql_query("SELECT MAX(fee_recd) FROM members",$connectup)or die ("Query failed:$latestError: " . mysql_error()); Would you be kind enough to tell us what text mysql_error() shows? You

Re: [PHP-DB] Getting a result from MAX() query

2004-07-13 Thread Doug Thompson
[EMAIL PROTECTED] wrote: Would somebody be kind enough to explain why this query produces a false result $latest=mysql_query("SELECT MAX(fee_recd) FROM members",$connectup)or die ("Query failed:$latestError: " . mysql_error()); but this one doesn't $latest=mysql_query("SELECT fee_recd FROM members

RE: [PHP-DB] Getting a result from MAX() query

2004-07-13 Thread Dylan Barber
Usually you need to group on something for a max to work (at least in Oracle) -Original Message- From: "Hutchins, Richard" <[EMAIL PROTECTED]> Sent: Jul 13, 2004 8:40 AM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Getting a result from MAX() query Sadly, I don't have any answers, only mor

RE: [PHP-DB] Getting a result from MAX() query

2004-07-13 Thread Hutchins, Richard
Sadly, I don't have any answers, only more questions. First, how do you know your query is returning a FALSE result? What test are you performing and what are the results of the test? Second, what type of column is fee_recd? I've been toying with the MAX() function on the command line with a num

[PHP-DB] Getting a result from MAX() query

2004-07-13 Thread boclair
Would somebody be kind enough to explain why this query produces a false result $latest=mysql_query("SELECT MAX(fee_recd) FROM members",$connectup)or die ("Query failed:$latestError: " . mysql_error()); but this one doesn't $latest=mysql_query("SELECT fee_recd FROM members ORDER BY fee_recd DESC

Re: [PHP-DB] endless loop / running as a service?

2004-07-13 Thread wuffo
Hi, maybe something like this would do: ( warning: it is just a sketch,and probably will not run ) 1. there are 4 files on the server: a) check-flag b) start-watch.php c) stop-watch.php d) watch.php 2. watch.php: // in the check-flag file we have

[PHP-DB] Re: endless loop / running as a service?

2004-07-13 Thread pete M
If you have shell access then run a cron job every minute or so see crontab http://www.nerc-online.com/support/www/crontab.html H. J. Wils wrote: I'd like to have a serverside script (php) who checks 24 hours a day wether theres a file uploaded to my server. But I don't know if that is possible,

[PHP-DB] endless loop / running as a service?

2004-07-13 Thread H. J. Wils
I'd like to have a serverside script (php) who checks 24 hours a day wether theres a file uploaded to my server. But I don't know if that is possible, since, as far as I know, php only recognizes user actions. But I don't know how to do this, can aynone help me? Thanks in advance!! PS: It's not