Hi
I've just taken on a db with a table ("pl") containing a list of shops - each shop has a 5-digit post code like "12345" - I use this post code to make a list of all postcodes in that table like this
$query = "SELECT * FROM pl GROUP BY PL_CP ASC";
the problem is that some of the post codes have been entered with whitespace like this "12345 "
this creates the problem that GROUP BY obviously sees "12345" and "12345 " as two different things
So i either need to be able to go through all post codes in the db and trim off the whitespace - or write a query that ignores whitespace if such a thing is possible
what do you think would be the best solution here ??
thanks