Re: [PHP-DB] Re: Error Loading File

2002-06-12 Thread Bryan Gintz
Whoops :), Yes, this is using phpMyAdmin, trying to use the "Insert data from a textfile into table" function, which uploads a file and the attempts to LOAD DATA INFILE. Like I said below, it worked on PHP 4.1.2, then when upgraded to PHP 4.2.1, it gave the error : "The file '/tmp/phpr4WYQY'

[PHP-DB] Connecting to MS Access

2002-06-12 Thread Bill Hudspeth
I am having problems connecting to an Access database. I am using Windows 2000, IIS 4, Access 2000, and PHP 4.2.1. I have created a system DSN using the Access (.mdb) driver, and have a username and password. What's going on?? Thanks, Bill The code I have used is as follows:

[PHP-DB] resource id#2 - ????

2002-06-12 Thread Jas
Not sure how to over come this, the result of a database query keeps giving me this: $id$file_name$file_size$file_properties< /td>$file_codec$file_author"; } } else { /* Start a new session and register variables */ session_start(); session_register('ipaddy'); session_register('referrer

RE: [PHP-DB] resource id#2 - ????

2002-06-12 Thread Leotta, Natalie (NCI/IMS)
The quick answer is that that is what it's supposed to return... that's all the result is. A nicer, longer answer is to give you some of my code so you can see one way that you actually get the data out (I use sybase_fetch_row, but you can also use _fetch_array which returns an associated array

Re: [PHP-DB] resource id#2 - ????

2002-06-12 Thread Paul DuBois
At 11:42 -0600 6/12/02, Jas wrote: >Not sure how to over come this, the result of a database query keeps giving >me this: >/* Get Ip address, where they came from, and stamp the time */ >if (getenv(HTTP_X_FORWARDED_FOR)){ > $ipaddy = getenv(HTTP_X_FORWARDED_FOR); >} else { > $ipaddy = get

RE: [PHP-DB] resource id#2 - ????

2002-06-12 Thread Leotta, Natalie (NCI/IMS)
I totally didn't even see that section of code. I am sorry I wrote back like you were an idiot! I think we know who the real idiot is today... :-) Sorry again! -Natalie -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 1:53 PM To: Jas; [EM

Re: [PHP-DB] resource id#2 - ????

2002-06-12 Thread Jas
Thanks a ton, I was really looking right past that variable. Jas "Paul Dubois" <[EMAIL PROTECTED]> wrote in message news:p05111763b92d3addd3b4@[192.168.0.33]... > At 11:42 -0600 6/12/02, Jas wrote: > >Not sure how to over come this, the result of a database query keeps giving > >me this: > > >/*

[PHP-DB] Querying for MAX

2002-06-12 Thread César Aracena
I’m sorry if this mensaje is posted twice. I sent it yesterdays, but then my ISP had problems with e-mail and I lost dozens of them and don’t know if sent OK. Hi all, What I’m trying to do here is not inside PHP nor MySQL books I have. I need to query the DB to look the max result in a column.

[PHP-DB] RE: [PHP] Querying for MAX

2002-06-12 Thread Leotta, Natalie (NCI/IMS)
is select MAX() what you are looking for? I know it works on numeric columns, I'm not sure if it works on non-numbers, you'd have to look it up in a SQL Tutorial somewhere. Good luck! -Natalie -Original Message- From: César Aracena [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12

[PHP-DB] RE: [PHP] Querying for MAX

2002-06-12 Thread César Aracena
Thanks Natalie & Ed. This Works just fine. What I want to do, is let a person subscribe new affiliates without having to look up what the last affiliate's number was and show the next one in the "new affiliate" form. César Aracena IS / MCSE+I Neuquén, NQN (0299) 156-356688 (0299) 446-6621 > ---

RE: [PHP-DB] Connecting to MS Access

2002-06-12 Thread Ryan Jameson (USA)
I've duplicated your problem. I know I've had this working before, I'll let you know if I can figure it out. :-) <>< Ryan -Original Message- From: Bill Hudspeth [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 10:22 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Connecting to MS Ac

RE: [PHP-DB] Connecting to MS Access

2002-06-12 Thread Ryan Jameson (USA)
It is the error message you get when you haven't selected the database file for your DSN. Go to your DSN, click configure, and click the SELECT button on the dsn. :-) <>< Ryan -Original Message- From: Ryan Jameson (USA) Sent: Wednesday, June 12, 2002 1:09 PM To: [EMAIL PROTECTED] Subje

Re: [PHP-DB] Auto-update database records

2002-06-12 Thread Tony
I finally got this auto-update script to work, thanks for your so many replies. Tony S. Wu Jason Wong at [EMAIL PROTECTED] wrote: > On Saturday 08 June 2002 21:34, Tony wrote: >> I do appreciate your reply. >> Yes, I've tried to track down the problem. >> I comment-out the fopen() function and

[PHP-DB] Re: Querying for MAX

2002-06-12 Thread Leon Mergen
select max(id) as amount from table "César aracena" <[EMAIL PROTECTED]> wrote in message 003301c21240$0cdcf790$89c405c8@gateway">news:003301c21240$0cdcf790$89c405c8@gateway... I'm sorry if this mensaje is posted twice. I sent it yesterdays, but then my ISP had problems with e-mail and I lost doze

[PHP-DB] problem with login script

2002-06-12 Thread suman
hi when i execute this script i an error ---function this func is in file functions.php and the func deletecookies(); auuser($login,$passwd) { global $db_server,$http_host,$db,$db_user,$db_pass,$doc_root; $conn

RE: [PHP-DB] Re: Querying for MAX

2002-06-12 Thread César Aracena
When I try to use this SELECT MAX(column) AS amount FROM table; with PHP, the result I get is always: "Resource id #2" and not the number I expect... but if I run this at the mysql command line, it shows the expected number/value. What is that? César Aracena IS / MCSE+I Neuquén, NQN (0299) 156-35

[PHP-DB] RE: [PHP] Re: Querying for MAX

2002-06-12 Thread César Aracena
When I try to use this SELECT MAX(column) AS amount FROM table; with PHP, the result I get is always: "Resource id #2" and not the number I expect... but if I run this at the mysql command line, it shows the expected number/value. What is that? César Aracena IS / MCSE+I Neuquén, NQN (0299) 156-35

[PHP-DB] RE: [PHP] Querying for MAX <-- solved

2002-06-12 Thread César Aracena
Come to think now, you are all right about making the field auto_increment, instead of asking the DB which one is the following number. It's just that I have a pretty large old DB in which this field is NOT in sequence and should be imported before I keep designing the scripts. Thanks to all of y

Re: [PHP-DB] Re: Error Loading File

2002-06-12 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Whoops :), > Yes, this is using phpMyAdmin, trying to use the "Insert data from a > textfile into table" function, which uploads a file and the attempts to > LOAD DATA INFILE. Like I said below, it worked on PHP 4.1.2, then when > upg

[PHP-DB] Re: Connecting to MS Access

2002-06-12 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > I am having problems connecting to an Access database. I am using Windows > 2000, IIS 4, Access 2000, and PHP 4.2.1. I have created a system DSN using > the Access (.mdb) driver, and have a username and password. What's going > on?? Thank

[PHP-DB] CGI Error - Need Help

2002-06-12 Thread G Morrison
I had to reinstall PHP & SQL, now whenever I run a PHP script I get the following error, can someone please help. Thanks CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: -- PHP Database Mailing List (http://www

[PHP-DB] Executing Queries from a File Using PHP

2002-06-12 Thread Bruce Vander Werf
Is there a PHP routine anywhere to execute a series of MySQL queries in a text file? I know how to do this via the command line or by using PHPMyAdmin, but I need to do it in my own PHP script, and some of the queries span more than one line. -- Bruce Vander Werf [EMAIL PROTECTED] -- PHP Dat

Re: [PHP-DB] Querying for MAX

2002-06-12 Thread Srinivasan Ramakrishnan
Hi César, As others have obviously pointed out using MAX() is the way to go. Need I mention that you can also insert values of your own making into an auto_increment column as long as they are not already used by some other record. In your case since you have old records with IDs of their own ma

Re: [PHP-DB] Executing Queries from a File Using PHP

2002-06-12 Thread Jason Wong
On Thursday 13 June 2002 10:48, Bruce Vander Werf wrote: > Is there a PHP routine anywhere to execute a series of MySQL queries in a > text file? > > I know how to do this via the command line or by using PHPMyAdmin, but I > need to do it in my own PHP script, and some of the queries span more tha

Re: [PHP-DB] problem with login script

2002-06-12 Thread Jason Wong
On Thursday 13 June 2002 06:00, suman wrote: > hi > when i execute this script i an error > ---func >tion > > this func is in file functions.php and the func deletecookies(); > > auuser($login,$passwd) > { > global $db_ser

[PHP-DB] connecting to a remote db?

2002-06-12 Thread Chris Payne
Hi there everyone, I have a secure server and another separate servr, both use PHP and MySQL – however, I need to connect to a db off of the secure server, how can I do this? I normally use localhost if it’s on the same machine, but how can I connect the DB to a DB on my other machine as I can

Re: [PHP-DB] connecting to a remote db?

2002-06-12 Thread Jason Wong
On Thursday 13 June 2002 14:23, Chris Payne wrote: > Hi there everyone, > > I have a secure server and another separate servr, both use PHP and > MySQL – however, I need to connect to a db off of the secure server, how > can I do this? I normally use localhost if it’s on the same machine, > but