[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

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

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

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 more

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:br$latestbrError: . 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 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:br$latestbrError: . mysql_error()); Would you be kind enough to tell us what text mysql_error() shows? You

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

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

[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?

[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:

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

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-DB]

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

[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

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

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 someone

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

2004-07-13 Thread Pablo M. Rivas
Hello Chris, easy as this? ?php $odd=1; while ($row=mysql_fetch_row($Res)) { if ($odd) { echo \ntr; $odd=0; } else $odd=1; echo td . $row[0] . /td; } ? CP Hi there everyone, CP I need my MySQL query to be

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: where

[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

[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

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:

[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

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 each one

[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 dont know how to pull out a group of rows within a range from a mysql result resource. $query =