> 
> STEP 1: Create the root of the image name
> update staff set imgName = Lower(CONCAT(Left(last,6),Left(first,2)));
> 
> STEP 2: 
> How do I delete spaces in the imgName?
> 
> STEP 3: 
> update staff set webLine = CONCAT("<td><img src='images/",imgName,".jpg'
> width='100' height='125'><br clear='all' />",first," ",last,"</td>");
> 
> Thanks in advance for your time spent in reading or responding.

Personally, I would move your html and string parse logic into php, rather
than in mysql, but that is up to you.  If you want to do this in mysql..

SELECT REPLACE('De Long', ' ', '');
+-----------------------------+
| REPLACE('De Long', ' ', '') |
+-----------------------------+
| DeLong                      |
+-----------------------------+
1 row in set (0.00 sec)


You could also do..

SELECT REPLACE('De Long', ' ', '%20');
+--------------------------------+
| REPLACE('De Long', ' ', '%20') |
+--------------------------------+
| De%20Long                      |
+--------------------------------+
1 row in set (0.00 sec)


Which will url encode the space, which will allow perfectly for spaces in
filenames on a web server.
-- 
-------------------------------------------------------------
Scott Haneda                                Tel: 415.898.2602
<http://www.newgeo.com>                     Novato, CA U.S.A.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to