On Monday, April 8, 2002, at 11:35  AM, Jas wrote:

> So putting it into an UPDATE statement it would be something like this
> right?
> UPDATE CONCAT $table_name SET ('http://localhost/images') 
> ad01="\$ad01\"";

No, like this:

The table is named "test_table"
The column you want to add this to is named "test_column"

You are taking the data that test_column contains, and prepending 
"http://localhost/images"; to the beginning of that data:

UPDATE test_table SET test_column = CONCAT('http://localhost/images', 
test_table.test_column)

Warning: This command will change every single row in your table so that 
'http://localhost/images' will be prepended before whatever data is 
already in that row.  You probably want to make ABSOLUTELY SURE that 
this is what you want (are you sure you don't want a trailing slash in 
that CONCAT function?).  If you want to just test this out, or don't 
want to apply this change to EVERY row, you can add a WHERE clause to 
choose certain rows to update.

Keep in mind that test_column must be able to accommodate the new string 
(so you might need to make it a bigger VARCHAR or something).

Good luck,

Erik


----

Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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

Reply via email to