Re: [PHP-DB] Submitting form from a href

2006-07-14 Thread Andrew Kreps
Skip, Just so you know, there is a general PHP user's list available for just such a request. It's rather high-traffic, so be warned. Now then, on to the problem. I believe I've figured out a way to make this happen. I've only tested it on IE 6 and Firefox 1.5.0.4, so your browser

Re: [PHP-DB] PHP connect to mysql problem

2005-01-06 Thread Andrew Kreps
On Wed, 5 Jan 2005 15:25:21 +0300, Tsegaye Woldegebriel [EMAIL PROTECTED] wrote: Anybody help! I can't connect from my PHP to mysql using the following code: $link = mysql_connect(localhost, root, merkato) or die(Could not connect : . mysql_error()); it replies with error: Could not

Re: [PHP-DB] MySQL Auto PK

2005-01-06 Thread Andrew Kreps
On Wed, 05 Jan 2005 18:11:23 -0500, John Holmes [EMAIL PROTECTED] wrote: OOzy Pal wrote: Is it possible to have mysql at an ID as 20050105-1 as (MMDD-1), -2, etc. automatically? No. But you can always just use SELECT CONCAT(date_column,'-',pk_column) AS fixed_id ... if you

Re: [PHP-DB] Update / Delete / Insert quandry

2005-01-06 Thread Andrew Kreps
On Thu, 6 Jan 2005 07:28:32 -0800 (PST), Stuart Felenstein [EMAIL PROTECTED] wrote: The problem I'm having a hard time getting my hands around are those areas where they can have multiple entries. One of the tables allows for a user to enter up to 5 choices. The table would look like

Re: [PHP-DB] select text from a text file

2005-01-06 Thread Andrew Kreps
On Wed, 5 Jan 2005 11:58:59 -, Ed [EMAIL PROTECTED] wrote: Happy new year folks! The titlemight make this seem like an easy to answer question However here's the complicated bit (well for me anyway). In my text file that is written to by the users in a chatroom it looks like this:

Re: [PHP-DB] Loading large volumes of data

2004-10-07 Thread Andrew Kreps
On Thu, 7 Oct 2004 09:05:55 +0200, Evan Morris [EMAIL PROTECTED] wrote: I have a text file containing strings. The text file is pretty massive, about 895 MB. I need to load the words in the text file into the database in such a way that there is a single occurrence of each word in the table.

Re: [PHP-DB] Obfuscator

2004-10-07 Thread Andrew Kreps
On Thu, 07 Oct 2004 09:10:16 -0400, Bastien Koert [EMAIL PROTECTED] wrote: Whats the point? Security thru obfuscation is not security at all. If you deem your site/data that sensitive, upgrade to ssl , lock the db down tight and pray that the sys admins at your host are on top of exploits and

Re: [PHP-DB] Database Backup

2004-10-06 Thread Andrew Kreps
On Wed, 6 Oct 2004 15:31:34 -0400, Aaron Todd [EMAIL PROTECTED] wrote: Do you happen to know how I might be able to push a file to another server using FTP? I might http://us4.php.net/ftp has a list of all the FTP related PHP functions with some ready-to-use examples. Enjoy! -- PHP

Re: [PHP-DB] accessing two databases within one script

2004-10-05 Thread Andrew Kreps
On Mon, 04 Oct 2004 22:31:15 -0400, Gary Rachel [EMAIL PROTECTED] wrote: I've tried not using the mysql_close statement. But that option doesn't select the new database, it seems to stay connected to the previous one, despite my specifying a new database to access. Can I not access two

Re: [PHP-DB] Auto-increment questions...

2004-10-05 Thread Andrew Kreps
On Tue, 5 Oct 2004 12:59:55 -0500, NIPP, SCOTT V (SBCSI) [EMAIL PROTECTED] wrote: OK. The problem is I don't want the next highest number. There are gaps in the UID sequence. I need to find the next UNUSED number in the sequence which is rarely the highest number. As far as I know,

Re: [PHP-DB] Auto-increment questions...

2004-10-05 Thread Andrew Kreps
On Tue, 5 Oct 2004 14:18:55 -0700, Andrew Kreps [EMAIL PROTECTED] wrote: if (isset ($lastId) ($lastId $id - 1)) { $returnVal = $lastId + 1; } Sorry, I left a bit of a bug in there. You should exit the loop at this point, if you've found a gap. -- PHP Database Mailing

Re: [PHP-DB] Unusual Array Results

2004-10-05 Thread Andrew Kreps
On Tue, 5 Oct 2004 13:49:11 -0700, Wendell Frohwein [EMAIL PROTECTED] wrote: Hello all again, I am using php 5.0.1 with mysql 4.1.4a-gamma. After I did this upgrade, I noticed pieced of my code were failing. Took me a while to figure it out. When I would be working with arrays, sometimes I

Re: [PHP-DB] Database Backup

2004-10-05 Thread Andrew Kreps
On Tue, 5 Oct 2004 16:33:08 -0400, Aaron Todd [EMAIL PROTECTED] wrote: What is everyone doing to backup a MySQL database. Just in case...I'd like to backup mine, but I was wondering if there was a way to do it without going to a page and clicking a button. Is there a way to run a php script

Re: [PHP-DB] Unusual Array Results

2004-10-05 Thread Andrew Kreps
On Tue, 5 Oct 2004 16:50:04 -0700, Wendell Frohwein [EMAIL PROTECTED] wrote: Hi Andrew. I'm using a class that was designed to search zip code radius's. Here is the piece that gets them. 2 Mile Radius Search From 90606 $radius=2; $zipArray1 = $zipLoc-inradius(90606,$radius1);

Re: [PHP-DB] Re: Convert plain text to HTML tagged text

2004-10-04 Thread Andrew Kreps
On Fri, 1 Oct 2004 23:33:46 -0400, GH [EMAIL PROTECTED] wrote: I have a question along this line... is it possible to have PHP do more than one str_replace at the same time? Have a look at the man page, it shows you how to use arrays to accomplish what you're trying to do.

Re: [PHP-DB] Setting a timed-session

2004-10-01 Thread Andrew Kreps
On Fri, 01 Oct 2004 14:16:44 -0500, Philip Thompson [EMAIL PROTECTED] wrote: This may be a bit elementary, however, I am confused on the functionality of it. I am wanting to create a session that logs out after a certain amount of time, no matter if the user is doing something or not. I have

Re: [PHP-DB] mysql to postgres migration blues...

2004-09-23 Thread Andrew Kreps
On Thu, 23 Sep 2004 20:51:52 +0200, Antoine [EMAIL PROTECTED] wrote: declaring it as global didn't seem to work - global $link; /* Connect to database */ $link = pg_connect(dbname=movies host=localhost user=anton password=password) The global keyword works a little bit differently