Re: [PHP-DB] UPDATE part of a column

2003-09-23 Thread mike karthauser
on 23/9/03 1:03 pm, Shaun at [EMAIL PROTECTED] wrote:

 1. How can I clean the table, so for example changing:
   Ashfield Business CentreBR The Idlewells PrecinctBR
 Sutton-in-AshfieldBR
   to:
   Ashfield Business Centre, The Idlewells Precinct, Sutton-in-Ashfield,
 
 2, Is there a way to make sure the data is 'clean' before entering into the
 table?

Do something like this:

$pagetext=ereg_replace( BR, ,$pagetext);

To strip the BRs 


-- 
Mike Karthauser 
Managing Director - Brightstorm Ltd

Email[EMAIL PROTECTED]
Web  http://www.brightstorm.co.uk
Tel  0117 9426653 (office)
   07939 252144 (mobile)

SnailmailUnit 8, 14 King Square,
   Bristol BS2 8JJ

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



RE: [PHP-DB] UPDATE part of a column

2003-09-23 Thread Jacob A. van Zanen

As a separate issue, I would consider seperating the address field into
it's individual parts
Street,area,city etc.. All different fields





-Original Message-
From: Shaun [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 23, 2003 2:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] UPDATE part of a column


Hi,

I have a column in my table called address. When users add an address
with a textarea they sometimes press return for a new line and this
seems to be putting line breaks into the database, so I have 2
questions:

1. How can I clean the table, so for example changing:
Ashfield Business CentreBR The Idlewells PrecinctBR
Sutton-in-AshfieldBR
to:
Ashfield Business Centre, The Idlewells Precinct,
Sutton-in-Ashfield,

2, Is there a way to make sure the data is 'clean' before entering into
the table?

Thanks for your help

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