[PHP-DB] Re: php and mssql on seperate servers

2008-04-24 Thread Peter Westergaard
Rick Taylor wrote: I'm new to PHP and having issues. We have seperate servers for them. We can use ODBC to test the connection and it works fine. However, when we try to run the site we get a message of *** Error: Unable to Connect to Database. Please Try Again Later. *** We are using a

[PHP-DB] Re: php-db Digest: Sending multiple values from a form having same field names.

2008-03-19 Thread Peter Westergaard
Your line : input type=hidden name=field_id value=?php echo $field_id;? / Should probably be: input type=hidden name=?php echo $field_id; ? value=?php echo $field_id;? / So that each field's name isn't the string field_id, but rather is each field's unique ID. Hi, How can I send

[PHP-DB] Re: Kesalahan posting: Don Komo

2008-03-19 Thread Peter Westergaard
Oops, I'm sorry, recovering from a 102 fever the other day. :) You don't want duplicate field IDs anywhere, really. The hidden fields are probably completely unnecessary; what do you use them for? It's the latter section you really need to correct, however, where each data field's name is

[PHP-DB] Re: A little SQL help

2008-01-31 Thread Peter Westergaard
Bastien, I think it would help if you described what result you were expecting, what version of SQL you're using, and where your error is occurring. I'm going to assume you're looking for a list of tours (including event start and end dates, event name, and result) for a specific angler (in

[PHP-DB] Re: php-db Digest 14 Jan 2008 19:48:27 -0000 Issue 3947

2008-01-14 Thread Peter Westergaard
Miguel - MD5() is a hash function, not an encryption function. A hash function cannot be reversed. One of the reasons some sites use MD5() for passwords is so that the passwords are never even stored on the server, only the hash. So even the site's database admin can't figure out the

[PHP-DB] Content Management

2005-03-22 Thread Peter Westergaard
. Anyone have any practical experience to share? Apologies if this has been rehearsed a thousand times before, I see discussions pop up in the archive but they never seem to come to a concensus so I'm going to risk asking again... -P -- Peter @ westergaard .ca A byte walks into a bar and orders

[PHP-DB] Re: PHP Max execution time

2004-07-15 Thread Peter Westergaard
Lisi [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am running a script (called through a browser) that checks entries in a table one at a time. As the table has grown, the script takes longer to run than is allowed - 30 seconds. Of course, I have to ask... is there absolutely no

[PHP-DB] Re: Restrict account access to single user

2004-07-15 Thread Peter Westergaard
In other words, how do we prevent two users from using the same password to access the same account at the same time? There are a few strategies I'd consider... each has plusses and minuses. 1) Lock to one IP. Keep a table with the most recent IP address, and the most recent access time. Any

[PHP-DB] Re: session_start

2004-07-15 Thread Peter Westergaard
Steve Butzel [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] It appears that Apache/PHP still thinks the session.save_path is /tmp, even though I changed this in php.ini-recommended and php.ini-dist. **What am I doing wrong?** Have you changed it in the version of php.ini which was

Re: [PHP-DB] Mysql and rollbacks

2004-07-14 Thread Peter Westergaard
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. Thanks, Kim. Any stable and fairly affordable hosts out there using these latest builds? Mine is back a few, no transactional functionality that I can

[PHP-DB] Re: Hold System

2004-07-14 Thread Peter Westergaard
Could I get a plain-language explanation of the process of a 'hold'? I'm not entirely clear what is happening, and what an 'expiry' means in the context of the hold and what a '#1 position' would represent for a student. -P -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP-DB] Re: Hold System

2004-07-14 Thread Peter Westergaard
I guess I'm still not grasping... Who creates the temporary I'm-trying-to-place-you link between coordinator and student? The system automatically, or the coordinator manually? What is a #1 position? How does a student get there? Who or what places them there? How do they leave that

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

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

[PHP-DB] Re: Column Help Needed

2004-07-09 Thread Peter Westergaard
do what you want. -- Peter Westergaard [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] fetch row DISTINCT

2004-07-09 Thread Peter Westergaard
Lars, 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 issue a SELECT * FROM table WHERE

[PHP-DB] PHP Processing

2004-01-05 Thread Peter Westergaard
potentiality? Suggestions? A humble request: Responses which begin with: Don't use MySQL, please include a good affordable alternative? -P Peter Westergaard [EMAIL PROTECTED] ### ICQ#: 10294457 http://www.westergaard.ca/ ### http://courtly.livejournal.com -- 'Alright, you guys

[PHP-DB] Cookies with fopen

2003-12-10 Thread Peter Westergaard
webserver as credentials during the HTTP GET? Anyone done something similar? -P Peter Westergaard ICQ#: 10294457 [EMAIL PROTECTED] http://www.westergaard.ca http://courtly.livejournal.com ---TECHNOLOGY--- Human history becomes more and more a race between education and catastrophe. - H.G

[PHP-DB] Date Pulldown

2003-11-02 Thread Peter Westergaard
Sorry for what is probably going to be a late reply. I'm waiting to pick someone up at the airport, and the plane was delayed, so I wanted to try my hand at answering your question. First I had to figure out what method you used to pick those dates in the first place. It seems to be...

[PHP-DB] Re: foreach() db brainiacs please help?

2003-09-10 Thread Peter Westergaard
) - returns nothing - outputs Danielle - calls function_name (Danielle) --- returns nothing - outputs Edward - calls function_name (Edward) --- returns nothing Make sense? Peter Westergaard [EMAIL PROTECTED] ### ICQ#: 10294457 http://www.westergaard.ca/ ### http

[PHP-DB] PHP errors - strange variables causing form corruption?

2003-07-30 Thread Peter Westergaard
at westergaard.ca is Linux, but I've also tested this on a Win2000 IIS webserver, and have the exact same results. If anyone has any clue what is going on, I'd really appreciate a suggestion. Thanks! Peter Westergaard [EMAIL PROTECTED] ### ICQ#: 10294457 http://www.westergaard.ca

[PHP-DB] (Addendum)

2003-07-30 Thread Peter Westergaard
I guess the .phpsrc is being interpreted as PHP anyhow, so let me just include the body of the page, below: --- ?php # (DEBUG) -- foreach ($HTTP_POST_VARS as $key = $value) print ($key = $value br); # (DEBUG) -- foreach ($HTTP_SERVER_VARS as $key = $value) print ($key =

[PHP-DB] Re: php-db Digest 11 Dec 2002 07:34:07 -0000 Issue 1566

2002-12-11 Thread Peter Westergaard
At 07:34 AM 12/11/2002 +, you wrote: I understand that the column name does not normally need quotes, but without quotes on the column name I get a mysql error message about no column named 'id'. Unfortunately, I cannot even get the UPDATE statement working outside of PHP through an

[PHP-DB] Complex (for me) table join - help please?

2002-04-19 Thread Peter Westergaard
. (And, as you can appreciate, since I'm not the one maintaining it, I'm like THAT CLOSE from just going that way and saying 'screw em'!) Hopefully, -Peter Westergaard -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] RE: phpMyAdmin - blank screen?

2002-01-14 Thread Peter Westergaard
hallo guys! i'm a newbie in php..I've installed phpMyAdmin on my pc, together with MySQL and Apache with PHP 4 on Win98. the index.php page is blank! any ideas/suggestions from u ppl? gracias! Can you post some of the code from your index.php? Have you installed it all correctly, ie placed

[PHP-DB] RE: permissions for writing file

2002-01-14 Thread Peter Westergaard
I'm trying to use PHP and MySQL to query a table and write the contents to a new file. When run the command to outfile it tells me I don't have permissions. This is on a Unix machine. I haven't run this on Unix myself, but I think this answer might be useful. Someone please correct me if I'm

[PHP-DB] RE: LIMIT and get_num_rows

2002-01-14 Thread Peter Westergaard
but presumably if i'm doing a SELECT count(*) FROM Designs WHERE Keywords LIKE %sport% followed by a SELECT * FROM Designs WHERE Keywords LIKE %sport% LIMIT 0,20 it's still using nearly as much processing time as just returning all the designs and just using a get_num_rows and then only using

[PHP-DB] RE: Pulling a long list of data stalls PHP

2002-01-10 Thread Peter Westergaard
At 08:03 AM 1/9/2002 -0800, Max wrote: Just curious, but which version of PHP are you using, the ISAPI or CGI. I've tried the isapi version before and had problems like this. PHP would crash and leave orphaned instances of php. If your using the isapi version try the cgi and see if it works

[PHP-DB] Re: Pulling a long list of data stalls PHP (SOLVED!)

2002-01-09 Thread Peter Westergaard
Thanks to Miles! The problem, for anyone who is going through this themselves lay (in my case) with my php.ini file - evidently my fat fingers copied the 'recommended' php.ini file, instead of the 'distro' php.ini file. The 'Recommended' file contains a few optimizations and security

[PHP-DB] Re: Insert data selected from drop down list into mySQL table

2002-01-09 Thread Peter Westergaard
George, When you use: pre OPTION value=$prd$prd/OPTION /pre Why not use the Product ID in the VALUE tag, and use the Product NAME between the OPTION /OPTION tags? That way, the VALUE is what is selected, and you can then use an SQL INSERT or UPDATE command to push that into the

[PHP-DB] RE: query and count

2002-01-09 Thread Peter Westergaard
It seems like what you're looking for is first to do a SELECT DISTINCT .. to find all the unique topic names in the system. This, in your case, would present you with Billie, Bill, Bret, ... etc. Then, in a loop as you traverse this result, create a query for the count of each of these

[PHP-DB] Re: Pulling a long list of data stalls PHP

2002-01-08 Thread Peter Westergaard
Miles, you wrote: Is your table indexed on the field your query is based on? That will greatly speed up the query. Miles Thompson I'm afraid in my case, the query needs to be pretty much a complete table dump. Even if I filter a subset the data, my relational DB experience (not deep,

Re: [PHP-DB] Re: Pulling a long list of data stalls PHP [_SOLVED_]

2002-01-08 Thread Peter Westergaard
Thanks to Miles! The problem, for anyone who is going through this themselves lay (in my case) with my php.ini file - evidently my fat fingers copied the 'recommended' php.ini file, instead of the 'distro' php.ini file. The 'Recommended' file contains a few optimizations and security patches,

[PHP-DB] Pulling a long list of data stalls PHP

2002-01-07 Thread Peter Westergaard
Hi, I'm attempting to pull about 300 rows from a mysql database, (all rows in the table). I can pull the first 10, the first 20, the first 30, no problem. (using LIMIT (start), (10|20|30)... in the SQL statement) But if I attempt to pull all of them (no LIMIT clause), or even the first (x)

[PHP-DB] Re: Is this kind of querry possible in MySQL?

2002-01-07 Thread Peter Westergaard
Assuming that c.province is the province name, and c.province_id is the province code, and U.province_id is the province code from the User table, I don't see where in your statement you have filtered the search down to just the province_id for the CURRENT USER. I think you need something

[PHP-DB] RE: Formated Results

2002-01-07 Thread Peter Westergaard
Barry, Since you're posting to an HTML page, you need BR and/or P to produce formatting. I'm guessing that if you look at the SOURCE for the web page you've produced, you'll see all the formatting. So, you can either fetch the lyrics and replace all line-ends with BR, or else use the tags