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, A

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 the

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.. $file_name"; while ($file_name = readdir($dir)) { if (($file_name != ".") && ($file_name !="..")) { $file_list .= "$file_name"; } } $file_lis

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=$files"Could not execute query. Please try again later -- 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: http://www.php.net/unsub.p

[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

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) lies

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 tol

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: "; $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 select box... O

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

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 assigni

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 a

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: -Original Message- From: Zach Curtis [mailto:[EMAI

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- Fr

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 i

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

2002-04-05 Thread Bob
\n" ); echo( "\n" ); echo( "\n" ); echo( "\n" ); echo( "\n" ); echo( "\n" ); } function postcodeLookup() { global $pcdata, $youknowit, $maybe; $result = $database->query( "INSERT INTO victims( idNumber, firstName, lastName, phone, emailAddress, whateverElse ) VALUES(

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

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

[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

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!!! > > > $TI

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

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

[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: Bob "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 > somethin

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: $TIMER

[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] 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 [EMAI