Page 1 of 1

sort contents of a field within record ...

Posted: Mon Oct 10, 2011 12:14 pm
by pepe_lepew1962
Hello:

When I call up a specific record, I need to sort the contents of "tblpartmanuf" and replace that field with the sorted information. Lets say the record is:

tblpartnumber tblpartmanuf
12544 GFSD

After I edit some other fields, automatically sort the tblpartmanuf field so that it is:
12544 DFGS




$sql="SELECT tblpartnumber, tblpartmanuf FROM tblparts WHERE tblpartnumber ='$frmpartfinder'";
$result = mysql_query($sql) or die('Error: ' . mysql_error());

Re: sort contents of a field within record ...

Posted: Tue Oct 11, 2011 5:44 pm
by Christopher

Code: Select all

$row['tblpartmanuf'] = implode('', sort(str_split($row['tblpartmanuf'])));