[PHP-DB] Writing to file

2003-08-29 Thread Shahar
Hello All. I have a PHP script i've written, which takes up some file's content and puts it up in a textbox. that textbox is located inside of a form, which I can submit to make changes in the text, and by that modify the file itself. The file reads fine, with fread of course, and now comes my pr

Re: [PHP-DB] Upload multiple files?

2003-08-29 Thread colbey
Very simple... Call you files being uplaoded file1, file2, fileX in the HTML form.. [html] [/html] Then process with code like this: [code] $STARTFILE = 1; $ONFILE = "file" . $STARTFILE; while (isset($HTTP_POST_FILES["$ONFILE"])) { // Try! $SrcPathFile = $HTTP_POST_FILES["$ONFILE"]

RE: [PHP-DB] Upload multiple files?

2003-08-29 Thread Aaron Wolski
The other option is... You create a pop-up menu system. That have the file form field to select from a location. When you upload the image it populates a HTML display table so you can see it and also allows you to select another image. When you are done.. you close the pop-up menu and that's th

Re: [PHP-DB] Upload multiple files?

2003-08-29 Thread Chris Payne
Hi there, U you know what they say, keep it simple and you're probably right you know, I was thinking it would be more complex but i'll have a play with that idea (Isn't it amazing how sometime we try to make things harder for ourselves than they need be?). Thanks for pointing that solution o

RE: [PHP-DB] Upload multiple files?

2003-08-29 Thread Aaron Wolski
Well... Having never done this I would assume it's the same with and form field you want to use as an array (multiple selections). Create a few different fileselect fields all with the same name but adding in [] to make it an array. Then just loop through the array.. copying the file to the serv

[PHP-DB] Upload multiple files?

2003-08-29 Thread Chris Payne
Hi there everyone, I have created a newsletter system where you can do lots of nice things, one of the things is to be able to upload your images for the newsletter via the interface, unfortunately you have to do them 1 at a time. Is it possible to be able to select multiple images in 1 go? T

Re: [PHP-DB] MySQL: CREATE TABLE, BLOB, UNIQUE, INDEX etc

2003-08-29 Thread Ignatius Reilly
You should be very wary of the CREATE TABLE ... SELECT statement. >From experience, the types created are not always conform to intuition - I've had my share of nasty surprises Much safer to do a CREATE TABLE statement defining the column types, then do an INSERT INTO ... SELECT Ignatius

RE: [PHP-DB] Failure Notices When Posting to List - CLOSED

2003-08-29 Thread Hutchins, Richard
Fellow PHP-DB listers: Thank you to those of you who replied to let me know that I am not the only one experiencing this problem. For everybody else's edification, some of the other members of this list have stated that they have notified the postmaster of the problem. It's really just an annoyanc

[PHP-DB] MySQL: CREATE TABLE, BLOB, UNIQUE, INDEX etc

2003-08-29 Thread Dillon, John
My code: $query=" CREATE TABLE IF NOT EXISTS temp3 UNIQUE(CON175) IGNORE SELECT DISTINCT CONCAT($tbl2.this,$tbl2.that) AS CON175 FROM $tbl2 WHERE $tbl2.this='$rcc' "; gives error: Query failed: BLOB column 'CON175' used in key specification without a key length. Manua

Re: [PHP-DB] Failure Notices When Posting to List

2003-08-29 Thread Martin Marques
El Vie 29 Ago 2003 11:51, Hutchins, Richard escribió: > Is anybody else getting returned mail notices from the qmail-send program > at pb1.pair.com? I seem to get one with each post I send to the list and I > don't know what's happening with my posts. > > Not that they're "pure gold" or anything, b

[PHP-DB] Failure Notices When Posting to List

2003-08-29 Thread Hutchins, Richard
Is anybody else getting returned mail notices from the qmail-send program at pb1.pair.com? I seem to get one with each post I send to the list and I don't know what's happening with my posts. Not that they're "pure gold" or anything, but could somebody just confirm that my posts are getting throug

Re: [PHP-DB] another PHP Sql question...

2003-08-29 Thread Kit DeKat
At 09:33 AM 8/29/2003, you wrote: > You can do: > while ($row = $result->fetchRow(DB_FETCHMODE_ASSOC)) > { > extract ($row); > echo $feild_A . ' '; > > $row = $result->fetchRow(DB_FETCHMODE_ASSOC); > extract ($row); > echo $feild_A . ''; > } cl

Re: [PHP-DB] another PHP Sql question...

2003-08-29 Thread Parker Morse
On Friday, Aug 29, 2003, at 02:14 US/Eastern, jsWalter wrote: But now I've been thrown a wrench in the form of double row display. my client wants... a b c d e f ... .. I need to create... row_1/feild_A row_1/feild_B row_2/feild_A row_2/fe

RE: [PHP-DB] delte stmt problem with joins

2003-08-29 Thread Hutchins, Richard
> > Error: 1064 You have an error in your SQL syntax near 'pi > INNER JOIN > > table2 AS p ON p.ID = pi.product_id WHERE p.ow' at line 3 pi() is a mysql function that returns the value of pi. Could the pi in your query be causing some confusion? It seems that MySql may be expecting pi() not pi

[PHP-DB] another PHP Sql question...

2003-08-29 Thread Kit DeKat
At 09:33 AM 8/29/2003, you wrote: You can do: while ($row = $result->fetchRow(DB_FETCHMODE_ASSOC)) { extract ($row); echo $feild_A . ' '; $row = $result->fetchRow(DB_FETCHMODE_ASSOC); extract ($row); echo $feild_A . ''; } close, but doesn't han

Re: [PHP-DB] delte stmt problem with joins

2003-08-29 Thread John W. Holmes
Merlin wrote: Hi John, I am using MySQL 3.x My guess is that it does not support a query like this. If so, I am sure that there is a workaround I just dont know about. The values $tablex are present. This is the error msg: Error: 1064 You have an error in your SQL syntax near 'pi INNER JOIN

Re: [PHP-DB] delte stmt problem with joins

2003-08-29 Thread Merlin
Hi John, I am using MySQL 3.x My guess is that it does not support a query like this. If so, I am sure that there is a workaround I just dont know about. The values $tablex are present. This is the error msg: Error: 1064 You have an error in your SQL syntax near 'pi INNER JOIN table2 AS p O

Re: [PHP-DB] weird php error

2003-08-29 Thread Kieu D. Trang
try if (isset($_GET['login']) AND $_GET['login'] == 'forgot') KD On Fri, 29 Aug 2003, Tiberiu Ardeleanu wrote: > Try: > > if ($_GET['login'] == 'forgot') > > > - Original Message - > From: "OpenSource" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, August 29, 2003 7:38 AM

Re: [PHP-DB] delte stmt problem with joins

2003-08-29 Thread John W. Holmes
Merlin wrote: I would like to delete a row inside a mysql table. To find out which rows are affected the system has to check another table. Somehow I am doing this statement wrong and I cant find out why. Does anybody see the error? Thanx for any help on that. DELETE FROM $table1 pi RIGHT

[PHP-DB] delte stmt problem with joins

2003-08-29 Thread Merlin
Hi there, I would like to delete a row inside a mysql table. To find out which rows are affected the system has to check another table. Somehow I am doing this statement wrong and I cant find out why. Does anybody see the error? Thanx for any help on that. DELETE FROM $table1 pi RIGHT

Re: [PHP-DB] Beta 2 of plPHP released.

2003-08-29 Thread Martin Marques
El Vie 29 Ago 2003 06:15, Ford, Mike [LSS] escribió: > On 29 August 2003 05:27, Joshua D. Drake wrote: > > Hello, > > > > Beta 2 of plPHP has been released. This version contains many bug > > fixes. For example, if you write bad plphp code and try to > > execute it, > > the code will no longer cr

RE: [PHP-DB] SELECT Part of a Field

2003-08-29 Thread Jacob A. van Zanen
Depending on the database you are using Substring() Substr() Functions do what you want jack -Original Message- From: Shaun [mailto:[EMAIL PROTECTED] Sent: Friday, August 29, 2003 11:58 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] SELECT Part of a Field Hi, How can I SELECT a portio

Re: [PHP-DB] SELECT Part of a Field

2003-08-29 Thread Ignatius Reilly
SUBSTRING() _ - Original Message - From: "Shaun" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, August 29, 2003 11:57 AM Subject: [PHP-DB] SELECT Part of a Field > Hi, > > How can I SELECT a portion of a field in a table for example the first > charac

[PHP-DB] SELECT Part of a Field

2003-08-29 Thread Shaun
Hi, How can I SELECT a portion of a field in a table for example the first character, or the second two characters etc? Thanks for your help -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] weird php error

2003-08-29 Thread Ford, Mike [LSS]
On 29 August 2003 06:39, OpenSource wrote: > Hi guys, > > This is weird to me.. > I got this script > --- > if ($_GET[login] == 'forgot') > { > echo "Sorry I forgot my password"; > } else { echo "you

RE: [PHP-DB] Beta 2 of plPHP released.

2003-08-29 Thread Ford, Mike [LSS]
On 29 August 2003 05:27, Joshua D. Drake wrote: > Hello, > > Beta 2 of plPHP has been released. This version contains many bug > fixes. For example, if you write bad plphp code and try to > execute it, > the code will no longer crash PostgreSQL ;). It would be nice if you told us what plPHP ac

Re: [PHP-DB] weird php error

2003-08-29 Thread Tiberiu Ardeleanu
Try: if ($_GET['login'] == 'forgot') - Original Message - From: "OpenSource" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, August 29, 2003 7:38 AM Subject: [PHP-DB] weird php error > Hi guys, > > This is weird to me.. > I got this script > --

Re: [PHP-DB] another PHP Sql question...

2003-08-29 Thread Tiberiu Ardeleanu
You can do: while ($row = $result->fetchRow(DB_FETCHMODE_ASSOC)) { extract ($row); echo $feild_A . ' '; $row = $result->fetchRow(DB_FETCHMODE_ASSOC); extract ($row); echo $feild_A . ''; } Tiberiu - Original Message - From: "jsWalt

RE: [PHP-DB] another PHP Sql question...

2003-08-29 Thread Jacob A. van Zanen
One question: Do you mean that a & b are from the same column but are row 1 & 2 from your query result.? If so, you can possibly write a loop like so Dump all your records in an array; Start loop for as long you find records in array { Take the first record from your array and dump it in

Re: [PHP-DB] Problem in executing linux command from PHP

2003-08-29 Thread Gnanavel
Quoting [EMAIL PROTECTED]: > From: "Gnanavel" <[EMAIL PROTECTED]> > > > > I have problem in executing linux command > > > > $output=exec("ls -a"); > > echo "$output"; > > > > the above coding works, but > > > > $output=exec("cp file1 file2"); > > echo "$output"; > > > > does not works. can any

Re: [PHP-DB] another PHP Sql question...

2003-08-29 Thread jsWalter
> "Boaz Yahav" <[EMAIL PROTECTED]> wrote in message > I'm not sure i understand the problem. > a,c,e come from one query result and b,d,f from another? No, they all come from the same table, but the same field name but from different rows of the database. > If it's all from the same query why n

Re: [PHP-DB] [SPAM?] [PHP-DB] Re: That movie

2003-08-29 Thread jsWalter
This is the SoBig.F virus. It hijacks a random email address form an infected persons phone book, uses that address as the SENDER, and then proceeds to mail out copies of itself to everyone in he infected persons phone book. I've had my address hijacked twice now. So, be warned, clean your syste

RE: [PHP-DB] another PHP Sql question...

2003-08-29 Thread Boaz Yahav
I'm not sure i understand the problem. Do a,c,e come from one query result and b,d,f from another? If it's all from the same query why not do : $result=mysql_query(". While($row = mysql_fetch_object($result)) { Echo"$row->feild_A$row->feild_B"; } Sincerely berber Visit http://www.we

[PHP-DB] Re: db connection php & mssql & win2k

2003-08-29 Thread jsWalter
This is what I use... // Pull in DB PEAR Collection require_once 'DB.php'; // What kind of database server are we connecting too? $db_type = 'mysql'; // local connectivity data $db_host = 'localhost'; $db_user = 'dbUsername $db_pass = 'dbUserPW'; $db_name = 'dbName'; // Data Source Name: This

[PHP-DB] another PHP Sql question...

2003-08-29 Thread jsWalter
I am querying a database just fine. Getting back what I expect, just fine. But now I've been thrown a wrench in the form of double row display. my client wants... a b c d e f ... Well, I've reached the end on my PHP/SQL knowledge (which really isn't all that far!) Right n

[PHP-DB] weird php error

2003-08-29 Thread OpenSource
Hi guys, This is weird to me.. I got this script --- - when ran, it gives me this error Notice: Use of undefined constant login - assumed 'login' in

[PHP-DB] updating and displaying problem.

2003-08-29 Thread rajni arya
Hello Everyone, I am working on PHP and PostGREsql.My doubt is first i am inserting my required information to the table after that i am updating one field with same information for all the records, now i want to update a particular record , i am able to update in database, but wh

[PHP-DB] Re: Beta 2 of plPHP released.

2003-08-29 Thread mzakaria
Thanks for your info. It's great stuff. "Joshua D. Drake" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > > Beta 2 of plPHP has been released. This version contains many bug > fixes. For example, if you write bad plphp code and try to execute it, > the code will no longer

[PHP-DB] Beta 2 of plPHP released.

2003-08-29 Thread Joshua D. Drake
Hello, Beta 2 of plPHP has been released. This version contains many bug fixes. For example, if you write bad plphp code and try to execute it, the code will no longer crash PostgreSQL ;). The URL is here: http://www.commandprompt.com/entry.lxp?lxpe=260 There are precompiled binaries for Re

Re: [PHP-DB] md5() and mysql

2003-08-29 Thread John W. Holmes
Mike Baerwolf wrote: I'm looking at using md5() and mysql for user auth to some of the data in a table. I found the following on the php md5 manual page, $query = "INSERT INTO user VALUES ('DummyUser',md5('DummyPassword'))"; $password = md5($password); $query = "SELECT * FROM user WHERE usernam

[PHP-DB] md5() and mysql

2003-08-29 Thread Mike Baerwolf
Hello, I'm looking at using md5() and mysql for user auth to some of the data in a table. I found the following on the php md5 manual page, $query = "INSERT INTO user VALUES ('DummyUser',md5('DummyPassword'))"; $password = md5($password); $query = "SELECT * FROM user WHERE username='DummyUser'