[PHP-DB] problem with some functions & MYSQL in LINUX

2003-08-03 Thread Nilashis
HI I'm having a problem using some php functions in LINUX machines. I'm trying the "header" function  to redirect my visitiors to a specific page & i want to generate the pages dynamically , using arguments (For ex. redir.php?img=1.jpg). It is

Re: [PHP-DB] subtracting dates...

2003-08-03 Thread Matthew McNicol
> In mySQL, I store dates as -MM-DD, a standard DATE type. It stores users > date of births. I need to calculate in a PHP script, the users age from this > DOB. I get a PHP date in the same format as the mySQL and subtract, which > returns the year rounded off. ie, it doesnt matter if your bir

[PHP-DB] query works fine on console but not with PHP - why?

2003-08-03 Thread Aaron Wolski
Hi guys, I have the following query which returns FINE through the console but not in PHP select t.id, t.colour, t.colourID, t.price, t.type, g.thread_index, g.groupNameUrl FROM kcs_threads t LEFT JOIN kcs_threadgroups g ON t.id = g.thread_index WHERE g.groupNameUrl = '0-500' The error I

Re: [PHP-DB] query works fine on console but not with PHP - why?

2003-08-03 Thread Matt
- Original Message - From: "Aaron Wolski" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, August 03, 2003 9:59 AM Subject: [PHP-DB] query works fine on console but not with PHP - why? > The error I am getting on the browser is: > > Warning: mysql_fetch_array(): supplied argume

RE: [PHP-DB] query works fine on console but not with PHP - why? SOLVED

2003-08-03 Thread Aaron Wolski
Hi and thanks, Actually.. there was a typo in an if() statement just prior to it that checked to see if a variable was set before proceeding with the query. What a dumb-ass I am. You know you've been working way to long when you can't do simple things. Thanks for your comments! Aaron -Orig

Re: [PHP-DB] query works fine on console but not with PHP - why?

2003-08-03 Thread Matthew McNicol
> The error I am getting on the browser is: > > Warning: mysql_fetch_array(): supplied argument is not a valid MySQL > result resource in http://www.martekbiz.com/KCS/utils.inc on line 52 line 52 is the following return statement in the db_fetch function : function db_fetch($results) { return

Re: [PHP-DB] query works fine on console but not with PHP - why?

2003-08-03 Thread Doug Thompson
You have an error in your PHP code, just as the error says. Including only the query, which you've already tested, isn't very helpful. The error message is telling you that the result "link identifier" used in your fetch statement isn't the same as returned by the query statement OR there was an

[PHP-DB] ***SOLVED *** query works fine on console but not with PHP ***SOLVED***

2003-08-03 Thread Aaron Wolski
Hi, Seem to still be getting responses to this question. I don't want people to take time out from what their doing to answer a question that is now solved. Just trying to help save some people the time and effort from their own development. Much appreciated answers though. They'll help me in f

[PHP-DB] Re: Free php editor!!

2003-08-03 Thread Jeffrey Dickman
There is eClipse, it can be found at http://sourceforge.net. It is a modular IDE, and there is a plugin for php. It is Java based, so it works on any platform. phpEdit is also free: http://www.phpedit.com Those are the best two editors I've found. -- PHP Database Mailing List (http://www.ph

[PHP-DB] make 2 queries into one?

2003-08-03 Thread Aaron Wolski
Hi All, Been trying to come up with a way to make the following queries into one which would speed up the processing I think. Code: $mQuery = db_query("SELECT manufacturer FROM kcs_threads GROUP BY manufacturer ORDER BY manufacturer"); while ($mResult = db_fetch($mQuery)) {

[PHP-DB] pg_lo_read_all(resource connection) bug?

2003-08-03 Thread justin
I think I wrote to the list before but I unfortunately didn't see a response on this. The functions in PHP to upload a large object work fine, and I can take out the object using the psql command line interface, but downloading a file with the php functions over the web the downloaded file is some

Re: [PHP-DB] pg_lo_read_all(resource connection) bug?

2003-08-03 Thread justin
The file sizes of the original file (kat_y_justin.jpg) and the downloaded file (kat_y_justin_dl.jpg) are only slightly different: -rw-r--r-- 1 justin staff 30877 Aug 3 14:37 kat_y_justin.jpg -rw-r--r-- 1 justin staff 30884 Aug 3 15:15 kat_y_justin_dl.jpg I'll do the bug report tomorrow mo

[PHP-DB] Renaming .htm pages to .php

2003-08-03 Thread David Blomstrom
I'm just about ready to publish my first "professionally" designed website, but there's a catch - all the pages end in .htm extensions, but I'm hoping to eventually learn how to use php and add some technical functions. Thus, I'd have to go back and change the .htm extensions to .php. So, could

Re: [PHP-DB] Renaming .htm pages to .php

2003-08-03 Thread David Smith
This doesn't have much to do with PHP and databases, but here's a thought: You can leave them all .htm and have apache treat .htm files as .php files. Just check out httpd.conf for configuration. If your box is sufficiently zippy, you will see now slow down by running pure html files through PH

Re: [PHP-DB] Renaming .htm pages to .php

2003-08-03 Thread David Blomstrom
At 05:58 PM 8/3/2003 -0600, David Smith wrote: This doesn't have much to do with PHP and databases, but here's a thought: You can leave them all .htm and have apache treat .htm files as .php files. Just check out httpd.conf for configuration. If your box is sufficiently zippy, you will see now s

RE: [PHP-DB] Renaming .htm pages to .php

2003-08-03 Thread Mike Brum
If you change you Apache configs, it wouldn't create a "problem" with .htm pages that don't use any PHP, but the pages will still be sent through the PHP parser. If you don't have a very high-traffic site and there's no other sites on the box, then you probably won't see any real performance hit -

Re: [PHP-DB] Renaming .htm pages to .php

2003-08-03 Thread George Patterson
On Sun, 3 Aug 2003 21:58:42 -0400 "Mike Brum" <[EMAIL PROTECTED]> wrote: > If you change you Apache configs, it wouldn't create a "problem" with > .htm pages that don't use any PHP, but the pages will still be sent > through the PHP parser. > > If you don't have a very high-traffic site and there

Re: [PHP-DB] Renaming .htm pages to .php

2003-08-03 Thread David Blomstrom
Thanks for all the tips. Incidentally, I just noticed that I'm getting e-mails in triplicates - the same e-mail three times. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] Renaming .htm pages to .php

2003-08-03 Thread Aaron Wolski
Same here. I get it all the time. Aaron -Original Message- From: David Blomstrom [mailto:[EMAIL PROTECTED] Sent: August 3, 2003 10:53 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Renaming .htm pages to .php Thanks for all the tips. Incidentally, I just noticed that I'm getting e-mai

RE: [PHP-DB] Renaming .htm pages to .php

2003-08-03 Thread Dennis Cole
Also, You would be best off changing only the one you thing you might need to use PHP later with, changing Apache to phase all .htm pages can get really slow is a insect comes about. -Original Message- From: David Blomstrom [mailto:[EMAIL PROTECTED] Sent: Sunday, August 03, 2003 10:53 PM

RE: [PHP-DB] Renaming .htm pages to .php

2003-08-03 Thread David Blomstrom
At 01:42 AM 8/4/2003 -0400, Dennis Cole wrote: Also, You would be best off changing only the one you thing you might need to use PHP later with, changing Apache to phase all .htm pages can get really slow is a insect comes about. I'll probably use server side includes for footers and other element