Re: [PHP-DB] Database Sorting by date

2002-04-05 Thread Ron Allen
I figured out the problemit was in my query statement SELECT * FROM $table where DATE LIKE '$month%' ORDER BY DATE desc This works perfectly, but in the effort to achieve greatness (won't ever happen), is this the most efficient way? Rick Emery [EMAIL PROTECTED] wrote in message [EMAIL

[PHP-DB] Cosmetics

2002-04-05 Thread Ron Allen
Does anybody out there know how to get the amount of time that a search took and then display it on the webpage!!! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Cosmetics

2002-04-05 Thread Jason Wong
On Friday 05 April 2002 17:57, Ron Allen wrote: Does anybody out there know how to get the amount of time that a search took and then display it on the webpage!!! $TIMER_START = explode( , microtime()); $TIMER_START = $TIMER_START[1] + $TIMER_START[0]; ## Do some stuff here:

[PHP-DB] Re: how to question...

2002-04-05 Thread Bob Klotz
Hi Jas, if I understood your question right, you can solve your problem best with something like the following: ?php $i=0; // counter $files = array(); // array to store directory content // open directory $dir = opendir(PATH_TO_DIR); // loop through directory and put filenames into an

[PHP-DB] Re: how to question...

2002-04-05 Thread Michael Virnstein
quite simple, look here: http://www.php.net/manual/en/function.readdir.php Jas [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Ok here is what I would like to accomplish, I am sure someone has done something like this but I need an example to go from since

[PHP-DB] Oracle - Executing Stored QUERIES

2002-04-05 Thread Chris Andrew
Hi, Please tell me this is possible: I have a bunch of stored queries on an Oracle machine. Using PHP from a separate RedHat box, I want to run these stored queries. My PHP is compiled with oracle support, and I can issue regular SQL to the Oracle box - such as SELECT foo FROM bar. This works

[PHP-DB] Re: viewing records

2002-04-05 Thread Hugh Bothwell
he will have access to the first record, which I'm displaying in a form. My question is: can another user view the same record at the same time? It depends entirely on where and how you get the data. Of itself, there is nothing to prevent the same record being displayed to any number of

Re: [PHP-DB] Cosmetics

2002-04-05 Thread Ron Allen
Works like a champ..friggin sweet Jason Wong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... On Friday 05 April 2002 17:57, Ron Allen wrote: Does anybody out there know how to get the amount of time that a search took and then display it on the webpage!!! $TIMER_START =

[PHP-DB] win_authenticate.php

2002-04-05 Thread Natividad Castro
does anybody know where I can find win_authenticate.php? I'm using the authenticate() function, but only works on LINUX. I want to be able to run on Windows also. Thanks in advanced Nato -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] win_authenticate.php

2002-04-05 Thread Natividad Castro
does anybody know where I can find win_authenticate.php? I'm using the authenticate() function, but only works on LINUX. I want to be able to run on Windows also. Thanks in advanced Nato -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Insert, Arrays, Null

2002-04-05 Thread Zach Curtis
I have attempted to insert data from an array into a table in which the values are string and numeric or NULL. The string values are no problem ($password, $int_id), but when I try to insert a value which may be either numeric or NULL (cusa, cusb, cusc) I can't produce a query that accounts for

RE: [PHP-DB] Insert, Arrays, Null

2002-04-05 Thread Rick Emery
When you say ...account for either a numeric or NULL value ..., do you mean SELECT a value that could be NULL? If so, the query is SELECT * FROM mytable WHERE cusa IS NULL || cusa = 0 -Original Message- From: Zach Curtis [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 9:11 AM

Re: [PHP-DB] saving details problem (big)

2002-04-05 Thread Bob
?php session_register( pcdata ); //Figure out what they want to do if( !$command ) main(); if( $command == postcodeLookup ) postcodeLookup(); exit; function main() { global $pcdata, $othervar1, $othervar2; echo( form name=postCode action=\$PHP_SELF?command=postcodeLookup\\n );

Re: [PHP-DB] Oracle - Executing Stored QUERIES

2002-04-05 Thread Thies C. Arntzen
On Fri, Apr 05, 2002 at 01:08:20PM +0100, Chris Andrew wrote: Hi, Please tell me this is possible: I have a bunch of stored queries on an Oracle machine. Using PHP from a separate RedHat box, I want to run these stored queries. My PHP is compiled with oracle support, and I can issue

RE: [PHP-DB] Insert, Arrays, Null

2002-04-05 Thread Zach Curtis
The data being read dynamically into the array could contain values which are NULL (the default) or numeric (if a numeric value exits). However, the query is using a INSERT INTO and I can't seem to form this query to account for either a NULL or numeric value. Zach -Original Message-

RE: [PHP-DB] Insert, Arrays, Null

2002-04-05 Thread Rick Emery
Is there some reason you are using the SET-clause version of INSERT? Also, given that cusa, cusb, cusc are INTs, DO NOT enclose in single-quotes You can do as I've done in the past; check for value of cusa and create INSERT accordingly: ?php if (isset($data_array[cusa]) ) $cusa =

RE: [PHP-DB] Insert, Arrays, Null

2002-04-05 Thread Zach Curtis
Terrific! I tried an example assigning the array to a variable using the if-else statements before creating the query. Now the table contains values and NULLs. Is there something wrong about using the SET clause version? I like to see the assignments for each column/value side by side. Is there

RE: [PHP-DB] Insert, Arrays, Null

2002-04-05 Thread Rick Emery
Using VALUES() is faster Nothing really wrong with SET clause, though -Original Message- From: Zach Curtis [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 10:34 AM To: Rick Emery; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Insert, Arrays, Null Terrific! I tried an example

[PHP-DB] Stuck on db entry from select box...

2002-04-05 Thread Jas
Ok here is my problem and where I am at this far, first thing I needed to do is to read the contents of a directory and place the results into a select box in a form (accomplished), now where I am stuck is passing the selection from said select box to another script so it may be put into a mysql

RE: [PHP-DB] Stuck on db entry from select box...

2002-04-05 Thread Rick Emery
jas, Ya didn't do what I told you to do. Now, do this: SELECT NAME=\files\; $sql = UPDATE $table_name SET file_name=\$files\; -Original Message- From: Jas [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 12:01 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Stuck on db entry from

RE: [PHP-DB] Stuck on db entry from select box...

2002-04-05 Thread Rick Emery
I had a typo: $sql = UPDATE $table_name SET file_name=\$files\; -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 12:29 PM To: 'Jas'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Stuck on db entry from select box... jas, Ya didn't do what I told

Re: [PHP-DB] Stuck on db entry from select box...

2002-04-05 Thread Jas
Ok I made the changes you suggested and unfortunately I am getting the same results... Could not execute query, I manually put entries into the tables so that the update command would just overwrite the current contents. Here is my code this far, I think my problem (correct me if I am wrong)

[PHP-DB] win_authenticate.php

2002-04-05 Thread Natividad Castro
does anybody know where I can find win_authenticate.php? I'm using the authenticate() function, but only works on LINUX. I want to be able to run on Windows also. Thanks in advanced Nato -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Making a txt file from db data, is it possible?

2002-04-05 Thread Raymond Lilleodegard
Hi! I would like to make a txt file our from some db output, is this possible? Couldn't find anything about it in the function list. Thanks for all help! Best regards Raymond Lilleodegard -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP-DB] Stuck on db entry from select box...

2002-04-05 Thread Jas
Upon doing a print $sql before the mysql_querie I get this output; UPDATE cm_index SET ad01_t=$filesCould not execute query. Please try again later -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] Stuck on db entry from select box...

2002-04-05 Thread Bob
I got it to work like this.. I don't know if you didn't want to use INSERT or something but it sticks the filename in the database table for me.. ?php $dir_name = /home/httpd/html/database/images; $dir = opendir($dir_name); $file_list .= pFORM METHOD=\post\ ACTION=\$PHP_SELF\ SELECT

Re: [PHP-DB] Stuck on db entry from select box...

2002-04-05 Thread Bob
Okay, so I figured out why you might want to use UPDATE instead of SELECT. And I also found that no matter what I tried, UPDATE doesn't seem to be able to UPDATE a table if there are no rows in it.. Otherwise it works fine.. So I found that I had to put an if test in that would check to see if

Re: [PHP-DB] Stuck on db entry from select box...

2002-04-05 Thread Bob
Bug report: You'll need to add another = to the if test.. if( $number == '0' ) $sql = INSERT INTO $table_name( files ) VALUES( \$files\ ); Dumb mistake.. Bob - Original Message - From: Bob [EMAIL PROTECTED] To: jas [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, April 05, 2002