OK, how about
:
<?php
mysql_connect(host,user,pass);
mysql_select_db(db);
$query = "SELECT ItemID, ItemSKU, ItemName FROM tbl";
$result = mysql_query($query);
while($row = mysql_fetch_array($result,MYSQL_ASSOC)) {
$ItemID = $row["ItemID"];
$ItemSKU = $row["ItemSKU"];
$ItemName = $row["ItemName"];
$NewItemSKU = str_replace("A","",$ItemName);
echo "<table>";
echo "<tr>";
echo "<td>$ItemID</td>";
echo "<td>$ItemSKU</td>";
echo "<td>$ItemName</td>";
echo "</tr>";
echo "</table>";
}
?>
Probably not the most accurate way of dealing with this but for the letter
A, it works. Hope this helps.
"carmoda" <ia********@hotmail.com> wrote in message
news:3f***********************@news.optusnet.com.a u...
Actually, I want to remove it from all entries in a column in the the
target database permanently. [in a query or script of some kind].
"Dmitry Ruban" <di**@region35.ru> wrote in message
news:bk***********@gavrilo.mtu.ru... Hey,
using php function http://ru.php.net/manual/nl/function.substr.php
try substr("A09807969",1)
that's it
Dima
"carmoda" <ia********@hotmail.com> wrote in message
news:3f***********************@news.optusnet.com.a u... this is a question for someone smarter than me:
how would i go about removing just the first character in a column?
i.e: if i wanted to remove the 'A' in the ItemSKU column
ItemID ItemSKU ItemName
1 A09807969 Red T-Shirt
2 A09807970 Green T-Shirt
3 A09807975 Blue Skirt
4 A09807935 Grey Skivy
5 A09804567 Red Cap
6 A09803866 Blue Y-Fronts
--
Regards,
Carmoda
iamcarmoda[remove-spam]@hotmail.com
====================================