i have a used car database that I need to convert the Manufacturer field to uppercase. I have tried the following quick script to accomplish this goal, but to no avail. Can someone tell me what I'm missing?
Thanks
Ray
<? / Code Sniplet /
$result = mysql_query("select * from usedcars where 1");
$row = mysql_fetch_array($result);
do {
$manu = strtoupper($row["manufacturer"]);
$searchstring = "update usedcars set manufacturer = ";
$searchstring .= $manu;
$searchstring .= " where carid = ";
$searchstring .= $carid;
/* Perform Update */
$result2 = mysql_query($searchstring);
if (!$result)
{
echo mysql_error();
exit;
}
} while ($row = mysql_fetch_array($result));
?> / End Sniplet /