Re: [PHP-DB] appending new entry to old entries

2002-04-18 Thread Ron Allen

Thanks

Jason Wong [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 On Thursday 18 April 2002 16:51, Ron Allen wrote:
  I would like to make it so that my helpdesk section can append entries
in
  their Master Station Log. Update replaces the entryany clues??

 You would have to get the original value, append the new stuff then do
UPDATE.

 --
 Jason Wong - Gremlins Associates - www.gremlins.com.hk
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *


 /*
 There is very little future in being right when your boss is wrong.
 */



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] appending new entry to old entries

2002-04-18 Thread Jonathan Hilgeman

Not sure if you're asking whether you can append info onto the end of a
database field without having to get the previous information, but you can. 

UPDATE table SET MyField=CONCAT(MyField,'Appended Text') WHERE Some_ID=5;

That would update the row identified by Some_ID = 5, and append Appended
Text to the end of MyField without a query to get the previous values. For
numeric fields, you can also increment them like this:

UPDATE table SET MyNumericField = MyNumericField + 1;

That would update all rows in table, incrementing every row's MyNumericField
value by 1.

- Jonathan

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 18, 2002 2:27 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] appending new entry to old entries


On Thursday 18 April 2002 16:51, Ron Allen wrote:
 I would like to make it so that my helpdesk section can append entries in
 their Master Station Log. Update replaces the entryany clues??

You would have to get the original value, append the new stuff then do
UPDATE.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *


/*
There is very little future in being right when your boss is wrong.
*/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] appending new entry to old entries

2002-04-18 Thread Gurhan Ozen

Ron,
Are we talking about appending new values to the database tables? If yes,
you need to use INSERT INTO ... VALUES  syntax ...
If you mean to append the new values to a file , then you need to open the
file in a mode.

Gurhan

-Original Message-
From: Ron Allen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 18, 2002 4:52 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] appending new entry to old entries


I would like to make it so that my helpdesk section can append entries in
their Master Station Log. Update replaces the entryany clues??



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] appending new entry to old entries

2002-04-18 Thread Beau Lebens

there might even be some cool SQL you can use tho, which would avoid having
to get the data out and then put it back in again.

I *think* (don't quote me on this) I remeber seeing something like

UPDATE myTable SET myField = CONCAT(myField + 'new string of stuff here')
WHERE myID='1'


HTH

beau

// -Original Message-
// From: Ron Allen [mailto:[EMAIL PROTECTED]]
// Sent: Thursday, 18 April 2002 7:34 PM
// To: [EMAIL PROTECTED]
// Subject: Re: [PHP-DB] appending new entry to old entries
// 
// 
// Thanks
// 
// Jason Wong [EMAIL PROTECTED] wrote in message
// news:[EMAIL PROTECTED]...
//  On Thursday 18 April 2002 16:51, Ron Allen wrote:
//   I would like to make it so that my helpdesk section can 
// append entries
// in
//   their Master Station Log. Update replaces the 
// entryany clues??
// 
//  You would have to get the original value, append the new 
// stuff then do
// UPDATE.
// 
//  --
//  Jason Wong - Gremlins Associates - www.gremlins.com.hk
//  Open Source Software Systems Integrators
//  * Web Design  Hosting * Internet  Intranet Applications 
// Development *
// 
// 
//  /*
//  There is very little future in being right when your boss is wrong.
//  */
// 
// 
// 
// -- 
// PHP Database Mailing List (http://www.php.net/)
// To unsubscribe, visit: http://www.php.net/unsub.php
// 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php